Getting started
Preface
Welcome to Korba Xchange REST API Documentation which will help you integrate Korba Xchange platform into your application.
Once you are registered you will be able to configure your account and operate transactions at https://xchange.korba365.com
Korba Xchange REST API exposes the following services: Collections, Payments, Airtime Topup Distribution, Internet Data Distribution. These Services are enabled on your account based on your account type
Base URL
All API requests must have Content-Type header as application/json
and must use the base URL below.
https://xchange.korba365.com/api/v1.0/
Authentication
The API uses a Hash-based Message Authentication Code (HMAC) which is a mechanism for calculating a message authentication code involving a hash function in combination with a secret key with a hash algorithm.
You will need the secret_key
and client_key
which are both accessible on the client dashboard under API/Website Creds. Please make sure these credentials are kept secret. Regenerate new ones once it is compromised.
The HMAC signature is calculated using the secret key
, a message
and applying SHA-256 encryption algorithm . The message
comprises of the request body which is converted to a string. The keys and values are separated by an "=", and each key-value pair is separated by an "&". The request body must be sorted by the key in Ascending order first before generating the message. The example below illustrates above rules:
Assuming your have the params below as your request body
{
"customer_number": "0204000000",
"amount": 15.0,
"network_code": "MTN",
"transaction_id": "X4569",
}
The message used for the calculation should be:
amount=15.0&customer_number=0204000000&network_code=MTN&transaction_id=X4569
Note that the keys of the request have been sorted in ascending order. This must be followed strictly else the message string will be different
The formula for calculating the signature is as shown below
HMAC Signature = HMAC(secret_key, message, SHA256).hexDecode
Note the above formula is language agnostic. Implementation varies based on the programming language you use.
You can use this online HMAC tester to test your implementation. Note that the encryption algorithm is SHA-256
The calculated HMAC signature together with the client_key
is used in the Authorization header as shown below
Authorization: HMAC {client_key}:{hmac_signature}
Assuming your client_key
is BDAKEY1234 and you HMAC signature is bd93f30 . A CURL request of the authentication is shown below
curl -X POST -H "Authorization: HMAC BDAKEY1234:bd93f30" -H "Content-Type: application/json" http://xchange.korba365.com/api/v1.0/endpoint/
NB: The signature is calculated on the server based on the request received. The authenticity of the request is always guaranteed. If a party in the middle fiddles with the API call either for malicious reasons, or bug in a intermediary proxy that drops some important headers, the signature calculated on the server will not match because the request body used to calculate the signature before the request was sent has been altered.
Integration Modes
Sandbox Mode
By default, your account will be in sandbox mode. To begin testing in sandbox mode, whitelist the number(s) you would like to use by navigating to Integration Mode on the client dashboard
API request's will be accepted only from your whitelisted IP's. You can whitelist your IP's on the client dashboard
Production Mode
To switch from sandbox to production mode, navigate to Integration Mode and Request Production Access on the client dashboard
IP Whitelisting
API request's will be accepted only from your whitelisted IP's. You can whitelist your IP's on the client dashboard by navigating to API/Website Creds and select Whitelisted IP(S) Tab
Collections API
The collections API is used accept or receive money and credited to your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/collect/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer's mobile number.
This parameter is OPTIONAL only when a card transaction is being done.
|
amount |
MANDATORY Amount to be debited from customers account
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
network_code |
MANDATORY The network selected by you, a channel you wish to receive money from. It needs to be the code field of the response returned by the Collection Network Options API below.
POST
https://xchange.korba365.com/api/v1.0/collection_network_options/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2,
}
Response - Success
[
{"id":3,
"name":"AIRTEL",
"code":"AIR"
},
{"id":1,
"name":"MTN",
"code":"MTN"
},
{"id":4,
"name":"TIGO",
"code":"TIG"
},
{"id":5,
"name":"VISA / MASTER CARD",
"code":"CRD"
},
{"id":2,
"name":"VODAFONE",
"code":"VOD"
}
]
** The code field shoud be used as the network_code
** The name field can be displayed to users
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Description is Required When network_code is CRD
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
redirect_url |
OPTIONAL - Only requited when Card(CRD) option is selected as the network code. This is where your users will be redirected to on your website after they make card payments
|
Request Example
{
"customer_number": "024000000",
"amount": 10.0,
"transaction_id": "X13454",
"network_code": "MTN",
"callback_url": "http://www.myapp.com/callback",
"description": "awesome description",
"client_id": 2,
}
Response - Success
{
"success": true,
"redirect_url": null,
"results": "Transaction initiated successfully. Please Check Phone for prompt"
}
** redirect_url
is returned if it is a Card Transaction
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Invalid network code"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Wallet Code was not provided
|
404 |
Callback URL was not provided
|
405 |
Invalid Network Code
|
407 |
Duplicate Transaction ID
|
408 |
Invalid Callback URL
|
409 |
Invalid amount
|
410 |
Invalid customer number format. Number must be 10 digits in the format 02xxxxxxxx
|
Get Elevy (Collections)
Get Elevy and taxable amount for collections
POST
https://xchange.korba365.com/api/v1.0/get_elevy_collections/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer's mobile number.
This parameter is OPTIONAL only when a card transaction is being done.
|
amount |
MANDATORY Amount to be debited from customers account
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
network_code |
MANDATORY The network selected by you, a channel you wish to receive money from. It needs to be the code field of the response returned by the Collection Network Options API below.
POST
https://xchange.korba365.com/api/v1.0/collection_network_options/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2,
}
Response - Success
[
{"id":3,
"name":"AIRTEL",
"code":"AIR"
},
{"id":1,
"name":"MTN",
"code":"MTN"
},
{"id":4,
"name":"TIGO",
"code":"TIG"
},
{"id":5,
"name":"VISA / MASTER CARD",
"code":"CRD"
},
{"id":2,
"name":"VODAFONE",
"code":"VOD"
}
]
** The code field shoud be used as the network_code
** The name field can be displayed to users
|
Request Example
{
"customer_number": "024000000",
"amount": 105.0,
"network_code": "MTN",
"client_id": 2,
}
Response - Success
{
"success": true,
"taxable_amount": 5.0,
"elevy_charge": 0.1,
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Invalid network code"
}
Get Exchange Rate
Returns exchange for GHS against USD, EUR and GBP
POST
https://xchange.korba365.com/api/v1.0/get_exchange_rate/
POST Parameters:
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2,
}
Response - Success
{
'success': True,
'results': {
'GHSUSD': "12.5",
'GHSGBP': "14.0",
'GHSEUR': "13.2",
}
}
Direct Card Collections
The API Enables you to accept payment collections from cards.
POST
https://xchange.korba365.com/api/v1.0/direct_card_collection/
POST Parameters:
Request Example
{
'card_number': '4042123456789012',
'cvv':'808',
'card_name':'THOMAS CLEGG',
'amount': "1",
'expiry_month':'07',
'expiry_year':'29',
'transaction_id':'123467890',
'callback_url':'https://webhook.site/2b4ef766-3c9eba4',
'description': 'Order ID - 4045',
'success_redirect_url':'https://www.myapp.com/card_success?id=3434',
'failure_redirect_url':'https://www.myapp.com/card_failure?id=3434'',
"client_id": 8
}
Response - Success
{
"success":true,
"results":"Transaction initiated successfully, follow the link to complete the transaction",
"redirect_url":"https://testxchange.korba365.com/threeds/?token=f7b272f"
}
** A redirect_url
is always returned in the response for user to complete 3D authentication. If 3DS is not present on the card. The user wont have to do anything, they will be redirected to the success / failure url
** success_redirect_url
This is the URL where users will be redirected to when their transaction is successful.
NB: The fact that success redirect URL is called doesnt guarantee a transaction is successful and hence should not be treated as a status update. You can only confirm a transaction is successful via a callback or using the status check endpoint when this URL is called.
** failure_redirect_url
This is the URL a user will be redirected to when the transaction fails
** You will receive a callback immediately after a user completes 3D Authentication via the callback url provided in the request upon successful debit.
Successful Transaction
The callback URL is called like so as a GET request
https://YOUR_CALLBACK_URL?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
Failed Transaction
https://YOUR_CALLBACK_URL?transaction_id=UNIQUE_ID&status=FAILED&message=MESSAGE
Disbursement / Remittance API
The disbursement and remittance API is used send or disburse money from your Partner Wallet (OVA).
Disbursement API
POST
https://xchange.korba365.com/api/v1.0/disburse/
Remittance API
POST
https://xchange.korba365.com/api/v1.0/remittance/
Kindly note the parameters below works for both remittances and disbursements
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer's mobile number.
This parameter is OPTIONAL only when a Bank transaction is being done.
|
amount |
MANDATORY Amount to be disbursed to recipient
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
network_code |
MANDATORY The network selected by you, a channel you wish to disburse money to. It needs to be the code field of the response returned by the Collection Network Options API below.
POST
https://xchange.korba365.com/api/v1.0/disbursement_network_options/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2,
}
Response - Success
[
{"id":3,
"name":"AIRTEL",
"code":"AIR"
},
{"id":1,
"name":"MTN",
"code":"MTN"
},
{"id":4,
"name":"TIGO",
"code":"TIG"
},
{"id":16,
"name":"BANK-INSTANT",
"code":"ISP"
},
{"id":2,
"name":"VODAFONE",
"code":"VOD"
}
]
** The code field shoud be used as the network_code
** The name field can be displayed to users
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction
|
extra_info |
OPTIONAL extra information of the transaction.
|
payer_name |
OPTIONAL Payer Name. This is mandatory if transaction is a bank transaction
|
payer_mobile |
OPTIONAL Payer Mobile Number. This is mandatory if transaction is a bank transaction
|
bank_code |
Only Required when network_code is ISP. Kindly refer to the Bank Lookup section to obtain the bank code
|
recipient_bank_name |
Only Required when network_code is ISP. This is returned in the Bank Lookup endpoint.
|
bank_account_number |
Only Required when network_code is ISP
|
bank_account_name |
Only Required when network_code is ISP. This is returned in the customer lookup endpoint. Kind refer to the customer lookup section for the API call
|
Request Example (Mobile Money)
{
"customer_number": "024000000",
"amount": 10.0,
"transaction_id": "YX13454",
"network_code": "MTN",
"callback_url": "http://www.myapp.com/callback",
"description": "awesome description",
"client_id": 2,
}
Response - Success
{
"success": true,
"redirect_url": null,
"results": "Transaction initiated successfully."
}
*** For Instant bank tranfers, refer to below
Bank / Mobile Money Destinations Lookup
This Lookup is used to get all available banks/mobile networks and their respective codes
POST
https://xchange.korba365.com/api/v1.0/authorized_bank_list/
POST Parameters:
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
'client_id': 8,
}
Response - Success
{
"response_code": "100",
"results": [{
"bank_code": "300322",
"short_name": "GT",
"full_name": "GUARANTY TRUST BANK GHANA",
}, {
"bank_code": "300329",
"short_name": "ACCESS",
"full_name": "ACCESS BANK",
}, {
"bank_code": "300360",
"short_name": "ASL",
"full_name": "ADOM SAVINGS AND LOANS",
}, {
"bank_code": "300307",
"short_name": "ADB",
"full_name": "AGRICULTURAL DEVELOPMENT BANK",
}]
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Invalid Client ID"
}
Bank/Mobile Money Customer Lookup
The Customer Lookup is used to get information about the recipient bank account or mobile money number for user confirmation
POST
https://xchange.korba365.com/api/v1.0/authorized_customer_lookup/
POST Parameters:
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
bank_account_number |
MANDATORY Mobile Number or Bank Account Number
|
bank_code |
MANDATORY Bank Code. This can be found in the response of the instant_pay_bank_lookup
|
Request Example (Bank)
{
"customer_number": "203490346790",
'client_id': 8,
'bank_code': '300322'
}
Request Example (Mobile Money)
{
"customer_number": "233246887680",
'client_id': 8,
'bank_code': '300591'
}
Response - Success
{
"success":true,
"data":{
"StatusCode":"100",
"StatusMessage":"Success",
"AccountName":"THOMAS AKOLOVI",
"AccountNumber":"20********8",
"BankCode":"300323",
"BankName":"FIDELITY BANK LIMITED"
}
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Lookup Failed"
}
Request Example (BANK TRANSFER)
{
"client_id": 2,
"amount": "1.00",
"transaction_id": "X231641908840998",
"network_code": "ISP",
"callback_url": "https://www.myapp.com/awesome_callback/",
"description": "Yinga",
"bank_account_number": "1001000425098",
"bank_account_name": "Jane Doe",
"recipient_bank_name": "ECOBANK GHANA LTD",
"bank_code": "300312",
"payer_name": "John Doe",
"payer_mobile": "0244123456",
}
Response - Success
{
"success": true,
"redirect_url": null,
"results": "Transaction initiated successfully. Please Check Phone for prompt"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Wallet Code was not provided
|
404 |
Callback URL was not provided
|
405 |
Invalid Network Code
|
406 |
Bank Account Number was not provided
|
407 |
Bank Account Name was not provided
|
408 |
Bank Name was not provided
|
409 |
Bank Branch was not provided
|
410 |
Payer Mobile Number not provided
|
411 |
Payer Name not provided
|
412 |
Duplicate Transaction ID
|
413 |
Invalid Callback URL
|
414 |
Invalid Amount
|
415 |
Invalid Customer Number format
|
416 |
You do not have enough funds in your wallet to perform the transaction
|
Topup API
The Topup API is used to send airtime to mobile phones and debited from your Partner Wallet (OVA).
NB: For a complete transaction, the collections API must be called first to take money from customer before calling the topup API to transfer the airtime to the intended recipient
POST
https://xchange.korba365.com/api/v1.0/topup/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer's mobile number.
|
amount |
MANDATORY Airtime amount
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
network_code |
MANDATORY Network selected by you to receive airtime. It needs to be the code field of the response returned by the Topup Network Options API call
POST
https://xchange.korba365.com/api/v1.0/topup_network_options/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2,
}
Response - Success
[
{"id":3,
"name":"AIRTEL",
"code":"AIR"
},
{"id":1,
"name":"MTN",
"code":"MTN"
},
{"id":4,
"name":"TIGO",
"code":"TIG"
},
{"id":9,
"name":"GLO",
"code":"GLO"
},
{"id":2,
"name":"VODAFONE",
"code":"VOD"
}
]
** The code field shoud be used as the network_code
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
"customer_number": "024000000",
"amount": 10.0,
"transaction_id": "X13454",
"network_code": "MTN",
"callback_url": "http://www.myapp.com/callback",
"description": "awesome description",
"client_id": 2,
}
Response - Success
{
"success": true,
"results": "Transaction initiated successfully."
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Invalid Network Code"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Network Code was not provided
|
404 |
Callback URL was not provided
|
405 |
Invalid Network Code
|
406 |
Duplicate Transaction ID
|
407 |
Invalid Callback URL
|
408 |
Invalid Amount
|
409 |
Invalid customer number format
|
410 |
You do not have enough funds to perform this action
|
BULK Airtime Topup
POST
https://xchange.korba365.com/api/v1.0/bulk_topup/
Request Example
[
{
"customer_number": "024000000",
"amount": 10.0,
"transaction_id": "X13454",
"network_code": "MTN",
"callback_url": "http://www.myapp.com/callback",
"description": "a description",
"client_id": 2,
},
{
"customer_number": "024000001",
"amount": 1.0,
"transaction_id": "X13455",
"network_code": "AIR",
"callback_url": "http://www.myapp.com/callback",
"description": "the description",
"client_id": 2,
},
{
"customer_number": "024000002",
"amount": 15.0,
"transaction_id": "X13456",
"network_code": "VOD",
"callback_url": "http://www.myapp.com/callback",
"description": "awesome description",
"client_id": 2,
}
]
Params definitions as same as airtime topup
Surfline Internet Bundle Purchase
The Surfline API is used to purchase surfline internet bundles and debited from your Partner Wallet (OVA).
NB: For a complete transaction, the collections API must be called first to take money from customer before calling the surfline purchase API to purchase the bundle
POST
https://xchange.korba365.com/api/v1.0/purchase_surfline_bundle/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY surfline mobile number.
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
bundle_id |
MANDATORY Bundle selected by you, this must be the bundle_id field of the surfline bundle list API below.
POST
https://xchange.korba365.com/api/v1.0/get_surfline_bundles/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
customer_number |
MANDATORY Surfline number. Bundles may vary based on your surfline number
|
Request Example
{
"client_id": 2,
"customer_number": 0250000000
}
Sample Response - Success
{
"success":true,
"bundles":[{"currency":"GHS",
"validity":"15days",
"description":"1.5GB SURF MINI",
"price":"20",
"bundle_id":"1.5gbnewdata"
},
{"currency":"GHS",
"validity":"30days",
"description":"5GB SURF MEDI",
"price":"35",
"bundle_id":"5gbnewdata"
},
{"currency":"GHS",
"validity":"30days",
"description":"12GB SURF MAXI",
"price":"75",
"bundle_id":"12gbnewdata"
},
{"currency":"GHS",
"validity":"30days",
"description":"25GB SURF CLASSIC",
"price":"140",
"bundle_id":"25gbnewdata"
}
]
}
** The bundle_id field shoud be used as the bundle_id
|
amount |
MANDATORY bundle amount. This is the price field of the bundle selected from the surfline bundle list API.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
"customer_number": "024000000",
"amount": 10.0,
"transaction_id": "X13454",
"bundle_id": "1gb_surf',
"callback_url": "http://www.myapp.com/callback",
"description": "awesome description",
"client_id": 2,
}
Response - Success
{
"success": true,
"results": "Transaction initiated successfully."
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Invalid Network Code"
}
Error Codes
Error Code |
Description |
400 |
Surfline Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
Busy Internet Bundle Purchase
The Busy API is used to purchase Busy internet bundles and debited from your Partner Wallet (OVA).
NB: For a complete transaction, the collections API must be called first to take money from customer before calling the busy purchase API to purchase the bundle
POST
https://xchange.korba365.com/api/v1.0/purchase_busy_bundle/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY busy number.
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
bundle_id |
MANDATORY Bundle selected by you, this must be the PricePlanCode field of the busy bundle list API below.
POST
https://xchange.korba365.com/api/v1.0/get_busy_bundles/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
customer_number |
MANDATORY Busy number. Bundles may vary based on your busy number
|
Request Example
{
"client_id": 2,
"customer_number": 0250000000
}
Sample Response - Success
{
"list":[
{
"OfferGroupCode":"100000",
"OfferGroupName":"LifeStyle Bundles Group",
"GroupType":"C",
"Bundle":{
"BundleList":[
{
"PricePlanRemarks":"Ideal for Regular use of Social Media.",
"PricePlanCode":"601",
"SalesPrice":"17",
"PricePlanName":"2GB Social Pack"
},
{
"PricePlanRemarks":"Ideal for The avid 'YouTuber' Valid for 30days.",
"PricePlanCode":"603",
"SalesPrice":"38",
"PricePlanName":"5GB Youtube Pack"
}
]
}
},
{
"OfferGroupCode":"200000",
"OfferGroupName":"Data Bundles Group",
"GroupType":"C",
"Bundle":{
"BundleList":[
{
"PricePlanRemarks":"Ideal for individuals occasionally using social media.",
"PricePlanCode":"703",
"SalesPrice":"12",
"PricePlanName":"500MB Data"
},
{
"PricePlanRemarks":"Ideal for individuals regularly downloading music.",
"PricePlanCode":"704",
"SalesPrice":"19",
"PricePlanName":"1GB Data"
},
{
"PricePlanRemarks":"Ideal for individuals regularly downloading music.",
"PricePlanCode":"705",
"SalesPrice":"30",
"PricePlanName":"2GB Data"
}
]
}
},
{
"OfferGroupCode":"60000",
"OfferGroupName":"Add-On Bundle Group",
"GroupType":"C",
"Bundle":{
"BundleList":[
{
"PricePlanRemarks":"null",
"PricePlanCode":"792",
"SalesPrice":"14",
"PricePlanName":"1GB Add-On"
}
]
}
}
],
"resp_code":"01",
"message":"Package query successful"
}
** The PricePlanCode field shoud be used as the bundle_id
** Bundles must be grouped by the OfferGroupName as is in the API response and BundlesList displayed under them.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
amount |
MANDATORY bundle amount. This is the SalesPrice of the bundle selected from the get busy bundle list API.
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
"customer_number": "024000000",
"amount": 10.0,
"transaction_id": "X13454",
"bundle_id": "703',
"callback_url": "http://www.myapp.com/callback",
"description": "awesome description",
"client_id": 2,
}
Response - Success
{
"success": true,
"results": "Transaction initiated successfully."
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Invalid Network Code"
}
Error Codes
Error Code |
Description |
400 |
Busy Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
ECG Post Paid
The ECG Post Paid API is used to pay ECG bills and is debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/ecg_pay_bill/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY ECG account number.
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY amount.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction.
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
'customer_number': "001XXXXXXX",
'client_id': 2,
'amount': 0.5,
'transaction_id': '07790676',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{
"responseCode": "01",
"responseMessage": "Bill payment successful",
"data": {
"OK": true,
"ErrorCode": 0,
"Message": "OK",
"Receipt": {
"ECGTransactionID": "129XXXXX",
"TerminalID": "00XXXXX",
"AccountNumber": "827-XXXX-XXX",
"CustomerName": "JOHN DOE ",
"CashierID": "KORBA",
"DistrictID": "XXXXXXX",
"MeterID": "XXXXXXX",
"AmountPaid": "0.50",
"PaymentDate": "26/04/2018",
"PaymentTime": "03:03 PM",
"PaymentMethodName": "",
"PaymentMethodValue": "",
"FileName": "",
"Bank": ""
}
}
}
Response - Failure
{
"success": false,
"error_code": 400,
"error_message": "Duplicate transaction amount"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
ECG Pre-Paid
The ECG Pre-Paid API is used to topup smart meters and is debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/ecg_meter_lookup/
POST Parameters:
Parameter |
Description |
meter_code |
MANDATORY ECG meter number. Numbers only
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
'meter_code': "1234567"
'client_id': 2,
}
Response - Success
{
"success": true,
"data": "Jane Doe"
}
Response - Failure
{
"success": false,
"data": "meter code does not exist in our system"
}
Error Codes
Error Code |
Description |
400 |
Meter Code was not provided
|
401 |
Meter Code should be numbers only
|
POST
https://xchange.korba365.com/api/v1.0/ecg_prepaid_initiate_request/
POST Parameters:
Parameter |
Description |
meter_code |
MANDATORY ECG meter number.
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY amount.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter korba_trans_id = unique ID from Korba amount = returns the transaction amount prepaid_token = returns ECG prepaid token
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction.
|
meter_owner |
MANDATORY name of meter owner.
|
Request Example
{
'meter_code': "P1234567",
'meter_owner': "Jane Doe",
'client_id': 2,
'amount': 10.00,
'transaction_id': '477984798798798',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{
"success":true,
"data":"Transaction added successfully"
}
Response - Failure
{
"success": false,
"error_code": 406,
"error_message": "Duplicate Transaction ID"
}
Error Codes
Error Code |
Description |
400 |
Meter Code was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Callback URL was not provided
|
405 |
Invalid Callback URL
|
406 |
Duplicate Transaction ID
|
407 |
Meter Owner was not provided
|
408 |
You do not have enough funds to perform this action
|
ECG Prepaid & Postpaid
The ECG Prepaid & Postpaid API is used to topup meters and is debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/ecg_prepaid_postpaid_account_inquiry/
POST Parameters:
Parameter |
Description |
power_app_number |
MANDATORY ECG meter number. Eg. 233208795528
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
'power_app_number': "233208795528"
'client_id': 2,
}
Response - Success
{
"success": true,
"message": {
"success": true,
"ResponseCode": "0000",
"Message": "Successful",
"Label": "Successful",
"Data": [
{
"Display": "KUMI ASAMOAH EMML (701411591)",
"Value": "701411591",
"Amount": 19.86,
}
]
}
}
Response - Failure
{
"success": false,
"message": {
"success": false,
"ResponseCode": "4000",
"Message": "Invalid destination value",
"Label": "Invalid destination value",
"Data": null
}
}
Error Codes
Error Code |
Description |
101 |
Power App Number was not provided
|
POST
https://xchange.korba365.com/api/v1.0/ecg_prepaid_postpaid_topup_account/
POST Parameters:
Parameter |
Description |
bundle |
MANDATORY ECG meter number that is being topped up.
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY amount to recharge.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter korba_trans_id = unique ID from Korba amount = returns the transaction amount
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction.
|
destination |
MANDATORY ECG account number linked to the Meter.
|
Request Example
{
'bundle': "P191177631",
'destination': "233208795528",
'client_id': 2,
'amount': 50.00,
'transaction_id': '8937982379872398',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{
"success":true,
"data":"Transaction pending. Expect callback request for final state."
}
Response - Failure
{
"success": false,
"error_code": 102,
"error_message": "Duplicate Transaction ID"
}
Error Codes
Error Code |
Description |
101 |
Please provide a transaction_id value
|
102 |
Duplicate Transaction ID
|
103 |
Please provide the destination value
|
104 |
Please provide the amount value
|
105 |
Please provide the bundle value
|
106 |
Please provide the callback_url value
|
107 |
Please provide only decimal values for amount
|
408 |
Invalid Callback URL
|
ECG Direct
The ECG Direct API is also used to topup meters and is debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/ecg_direct_meter_detail/
POST Parameters:
Parameter |
Description |
phone_number |
OPTIONAL phone number. Eg. 233208795528
|
account_number |
OPTIONAL account number. Eg. 700252531
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
'phone_number': "233208795528"
'client_id': 2,
}
OR
{
'account_number': "700252531"
'client_id': 2,
}
Response - Success
{
"success": true,
"results": {
{
"success":true,
"data":[
{
"id":"f26688edb1b540bbb8aae0ab048901a2",
"customerName":"MENSA FREDUA ",
"nameOnMeter":"MENSA FREDUA ",
"meterNumber":"G13304130",
"accountNumber":"737458440",
"address":"|0020-H/NOABURASO",
"meterType":"SMART G",
"balance":null,
"meterCategory":"PREPAID",
"alias":"MENSA FREDUA ",
"region":"ASHANTI WEST",
"district":"Ahenema Kokoben District",
"spn":"203810210",
"regionId":"E11",
"districtId":"6120",
"createSource":"oltpv"
}
]
}
}
}
Response - Failure
{
"success":false,
"error_code": 400,
"error_message": "Please provide a phone_number value"
}
Error Codes
Error Code |
Description |
101 |
Phone Number was not provided
|
POST
https://xchange.korba365.com/api/v1.0/ecg_direct_service_status/
POST Parameters:
Parameter |
Description |
meter_id |
MANDATORY ECG meter ID. Eg. P1234567
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
'meter_id': "P1234567"
'client_id': 2,
}
Response - Success
{
"success": true,
"results": {
{
"success": true,
"data": {
"isOnline": false
}
}
}
}
Response - Failure
{
"success":false,
"error_code": 400,
"error_message": "Please provide a meter_id value"
}
Error Codes
Error Code |
Description |
101 |
Meter ID was not provided
|
POST
https://xchange.korba365.com/api/v1.0/ecg_direct_add_meter/
POST Parameters:
Parameter |
Description |
alias |
MANDATORY ECG customer name.
|
meter_number |
MANDATORY ECG meter number
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
account_number |
OPTIONAL ECG account number.
|
phone_number |
MANDATORY phone number
|
meter_category |
MANDATORY ECG meter category found in a successful response of the Meter Detail API
|
Request Example
{
'alias': "MENSA FREDUA"
'meter_number': P1234567,
'phone_number': "233208795528"
'meter_category': PREPAID,
'account_number': "737458440"
'client_id': 2,
}
Response - Success
{
"success":true,
"results":{
{
"message":"Meter added Successfully",
"code":"201",
"data":{
"unsupported":false,
"id":"a2c363ec6545486eaeb299bc7a64cefb",
"customerName":"PROSPER TETTEH",
"nameOnMeter":"PROSPER TETTEH",
"meterNumber":"P191177631",
"accountNumber":"733342761",
"address":"5240-, St1 - Achimota - KWASHIEMAN, KWASHIEMAN, ACHIMOTA",
"meterType":"NURI",
"balance":null,
"meterCategory":"PREPAID",
"alias":"my home meter",
"region":"Accra West Region",
"district":"Achimota District",
"spn":"203508274",
"regionId":"",
"districtId":"",
"createSource":"oltpv"
}
}
}
}
Response - Failure
{
"success":false,
"error_code": 400,
"error_message": "Please provide a phone_number value"
}
Error Codes
Error Code |
Description |
101 |
Please provide a phone_number value
|
102 |
Please provide the alias value
|
103 |
Please provide the meter_number value
|
104 |
Please provide the meter_category value
|
POST
https://xchange.korba365.com/api/v1.0/ecg_direct_pay_bill/
POST Parameters:
Parameter |
Description |
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY amount to recharge.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter korba_trans_id = unique ID from Korba amount = returns the transaction amount
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction.
|
meter_id |
MANDATORY ECG meter ID.
|
meter_number |
MANDATORY ECG meter number.
|
Request Example
{
'meter_id': "P191177631",
'client_id': 2,
'amount': 50.00,
'transaction_id': '8937982379872398',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{
"success":true,
"results":{
{
"success":true,
"data":{
"id":"f26688edb1b540bbb8aae0ab048901a2",
"customerName":"MENSA FREDUA ",
"nameOnMeter":"MENSA FREDUA ",
"meterNumber":"G13304130",
"accountNumber":"737458440",
"address":"|0020-H/NOABURASO",
"meterType":"SMART G",
"balance":null,
"meterCategory":"PREPAID",
"alias":"MENSA FREDUA ",
"region":"ASHANTI WEST",
"district":"Ahenema Kokoben District",
"spn":"203810210",
"regionId":"E11",
"districtId":"6120",
"createSource":"oltpv"
}
}
}
}
Response - Failure
{
"success": false,
"error_code": 101,
"error_message": "Please provide a amount value"
}
Error Codes
Error Code |
Description |
101 |
Please provide a transaction_id value
|
102 |
Duplicate Transaction ID
|
103 |
Please provide the meter_id value
|
104 |
Please provide the amount value
|
105 |
Please provide the callback_url value
|
106 |
Please provide the meter_number value
|
107 |
Please provide only decimal values for amount
|
108 |
Invalid Callback URL
|
GWCL Customer Lookup
The GWCL Customer Lookup API is used to get details about the customer
POST
https://xchange.korba365.com/api/v1.0/gwcl_customer_lookup/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY GWCL customer number beginning with '233'.
|
account_number |
MANDATORY GWCL account number.
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"customer_number": "233200000000",
"account_number": "010******003",
'client_id': 2,
'transaction_id': '07790676',
}
Response - Success
{
"error_code": null,
"results": {
"payload": {
"accountRef": "030539061757",
"sessionId": "fb6774677b2922aae40596927115e62e32c041bd",
"name": "ABBAN GEORGE KWAKU YEBOAH .",
"charge": "83.05",
"extDetails": "{\"balance\":83.05}"
},
"responseMessage": "Success",
"responseCode": "01"
},
"success": true,
"transaction_id": "15375769322262"
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Duplicate transaction id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
GWCL Pay Bill
The GWCL Pay Bill API is used to pay Ghana Water Company Limited bills
POST
https://xchange.korba365.com/api/v1.0/gwcl_pay_bill/
POST Parameters:
Parameter |
Description |
transaction_id |
MANDATORY transaction ID from the GWCL Customer Lookup response.
|
amount |
MANDATORY amount.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction.
|
Request Example
{
"transaction_id": 'GWCL0XX06587',
"amount": 10.0,
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{
"results": {
"payload": {
"receiptNo": "180918000001",
"responseCode": "01",
"responseMessage": "Success",
"sessionId": "7329d714f2846853fedddab6f16ae3e53e96da60"
},
"responseCode": "01",
"responseMessage": "Bill payment successful"
},
"success": true,
"error_code": null
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Duplicate transaction id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
MTN Data Topup
The MTN data API is used to purchase MTN data and debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/mtn_data_topup/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (0).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
product_id |
MANDATORY Product ID selected by you, this must be the product_id field of the MTN data product id list API below.
POST
https://xchange.korba365.com/api/v1.0/get_mtndata_product_id/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2
}
Sample Response - Success
{
"error_code":null,
"success":true,
"bundles":[
{
"name":"MTN Midnight Data Bundle 3G",
"product_id":"MTNMIDNGT3G",
"amount":"1.00",
"validity":"7 days"
},
{
"name":"MTN Midnight Data Bundle",
"product_id":"MTNMIDNIGHT",
"amount":"3.00",
"validity":"7 days"
},
{
"name":"MTN Monthly Data Bundle 200GB",
"product_id":"MTNMTH200GB",
"amount":"399.00",
"validity":"7 days"
}
]
}
|
amount |
MANDATORY bundle amount. This is the amount field of the bundle selected from the MTN data product id list API.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
'customer_number': "024000000",
'client_id': 2,
'product_id': 'MTNDLY20MB',
'amount': 0.5,
'transaction_id': '07790676',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{
"error_code":null
"success": true,
"results": {
"operatorRequestID":"1294993",
"responseDescription":"Successful",
"auditNo":"1329091",
"responseCode":"000",
"operatorRequestId":"1294993",
"providerResponse":"{\"TransactionID\":\"2018041813285160703901350\"}",
"productInfo":"MTN Daily Data Bundles",
"confirmationCode":"2018041813285160703901350",
"authorizeKey":"1348888"
}
}
Response - Failure
{
"success": false,
"error_code": 402,
"error_message": "Please make sure you provide a correct product_id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
MTN Fibre Topup
The MTN FIbre API is used to purchase MTN Fibre and debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/mtn_fibre_topup/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (0).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
product_id |
MANDATORY Product ID selected by you, this must be the product_id field of the MTN data product id list API below.
POST
https://xchange.korba365.com/api/v1.0/get_mtnfibre_product_id/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2
}
Sample Response - Success
{
"error_code":null,
"success":true,
"bundles":[
{
"name":"MTN Midnight Fibre Bundle 3G",
"product_id":"MTNMIDNGT3G",
"amount":"1.00"
},
{
"name":"MTN Midnight Fibre Bundle",
"product_id":"MTNMIDNIGHT",
"amount":"3.00"
},
{
"name":"MTN Monthly Fibre Bundle 200GB",
"product_id":"MTNMTH200GB",
"amount":"399.00"
}
]
}
|
amount |
MANDATORY bundle amount. This is the amount field of the bundle selected from the MTN data product id list API.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
'customer_number': "024000000",
'client_id': 2,
'product_id': 'MTNDLY20MB',
'amount': 0.5,
'transaction_id': '07790676',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{'success': True, 'results': 'Transaction initiated successfully.', 'error_code':None}
Response - Failure
{
"success": false,
"error_code": 402,
"error_message": "Please make sure you provide a correct product_id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
Airtel Tigo Data Topup
The Airtel Tigo Data API is used to purchase MTN Fibre and debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/airteltigo_data_topup/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (0).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
product_id |
MANDATORY Product ID selected by you, this must be the product_id field of the MTN data product id list API below.
POST
https://xchange.korba365.com/api/v1.0/get_airteltigodata_product_id/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2
}
Sample Response - Success
{
"error_code":null,
"success":true,
"bundles":[
{
"name":"Airtel Bundle 3G",
"product_id":"AIRMIDNGT3G",
"amount":"1.00",
"validity":"7 days"
},
{
"name":"Airtel Bundle",
"product_id":"AIRMIDNIGHT",
"amount":"3.00",
"validity":"7 days"
},
{
"name":"Airtel Bundle 200GB",
"product_id":"AIRMTH200GB",
"amount":"399.00",
"validity":"7 days"
}
]
}
|
amount |
MANDATORY bundle amount. This is the amount field of the bundle selected from the MTN data product id list API.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
'customer_number': "024000000",
'client_id': 2,
'product_id': 'AIRDLY20MB',
'amount': 0.5,
'transaction_id': '07790676',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{'success': True,
'results': 'Transaction initiated successfully.',
'error_code':None}
Response - Failure
{
"success": false,
"error_code": 402,
"error_message": "Please make sure you provide a correct product_id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
Vodafone Data Topup
The Vodafone Data API is used to purchase Vodafone Data and debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/vodafone_data_topup/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (0).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY amount selected by you, this must be the amount field of the Vodafone data product id list API below.
POST
https://xchange.korba365.com/api/v1.0/get_vodafonedata_product_id/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2
}
Sample Response - Success
{
"error_code":null,
"success":true,
"bundles":[
{
"name":"Vodafone Bundle 3G",
"bundle_size":"400 MB",
"amount":"1.00",
"bundle_id":"V0D34980",
"validity":"7 days"
},
{
"name":"Vodafone Bundle",
"bundle_size":"1 GB",
"bundle_id":"VD34980",
"amount":"3.00",
"validity":"7 days"
},
{
"name":"Voda Bundle 200GB",
"bundle_size":"200GB",
"amount":"399.00",
"bundle_id":"V0D34980",
"validity":"7 days"
}
]
}
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
bundle_id |
MANDATORY returned in the get vodafone product data id above
|
Request Example
{
'customer_number': "024000000",
'client_id': 2,
'amount': 0.5,
'bundle_id': 'VDF4389345',
'transaction_id': '07790676',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{'success': True,
'results': 'Transaction initiated successfully.',
'error_code':None}
Response - Failure
{
"success": false,
"error_code": 402,
"error_message": "Please make sure you provide a correct bundle_id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
Glo Data
The GLO data API is used to purchase GLO data and debited from your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/new_glo_data_purchase/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (0).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
bundle_id |
MANDATORY Bundle ID selected by you, this must be the bundle_id field of the Two API Calls below.
1. Use the first API Call to get the bundle types
2. Use the Second API Call to fetch the bundles under a particular bundle type.
POST
https://xchange.korba365.com/api/v1.0/new_glo_data_get_bundle_types/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"client_id": 2
}
Sample Response - Success
{
"success": true,
"results": [
{
"id": 1,
"name": "Monthly",
"enabled": true
},
{
"id": 2,
"name": "Weekly",
"enabled": true
},
{
"id": 3,
"name": "Daily",
"enabled": true
}
],
"error_code": null
}
POST
https://xchange.korba365.com/api/v1.0/new_get_glodata_bundles/
Parameter |
Description |
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
bundle_type_id |
Bundle Type ID is the id field of the selected bundle type from the previous API above
|
Request Example
{
"client_id": 2,
"bundle_type_id": 1,
}
Sample Response - Success
{
"success": true,
"results": [
{
"name": "4.2GB Plan",
"productId": "BUNDLE_4.2GB_Plan",
"price": "GHS 20",
"volume": "4.2GB",
"validity": "30 days",
"active": true
},
{
"name": "10GB Plan",
"productId": "BUNDLE_10GB_Plan",
"price": "GHS 40",
"volume": "10GB",
"validity": "30 days",
"active": true
},
],
"error_code": null
}
|
amount |
MANDATORY bundle amount. This is the price field of the bundle selected from the Glo data bundle API.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
'customer_number': "024000000",
'client_id': 2,
'bundle_id': 'BUNDLE_4.2GB_Plan',
'amount': 0.5,
'transaction_id': '07790676',
'callback_url': 'https://webhook.site/fdd1d807-0147-4015-ab47-8ec7118ea595',
'description': 'awesome description',
}
Response - Success
{
"error_code":null
"success": true,
"results": {
"operatorRequestID":"1294993",
"responseDescription":"Successful",
"auditNo":"1329091",
"responseCode":"000",
"operatorRequestId":"1294993",
"providerResponse":"{\"TransactionID\":\"2018041813285160703901350\"}",
"productInfo":"MTN Daily Data Bundles",
"confirmationCode":"2018041813285160703901350",
"authorizeKey":"1348888"
}
}
Response - Failure
{
"success": false,
"error_code": 402,
"error_message": "Please make sure you provide a correct product_id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
403 |
Bundle ID was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
Transaction Status
This endpoint enables you to check for the status of your transaction at anytime.
POST
https://xchange.korba365.com/api/v1.0/transaction_status/
POST Parameters:
Parameter |
Description |
transaction_id |
MANDATORY Unique transaction ID generated by your system
|
client_id |
MANDATORY Client ID provided via the dashboard credentials
|
Request Example
{
"transaction_id": "X13454",
"client_id": "2"
}
Sample Response - Success
{
'status': 'success',
'message': 'Transaction was processed successfully',
'transaction_id': "X13454",
'korba_trans_id': 'YY422',
}
Sample Response - Failure
{
"success": false,
"error_code": 421,
"error_message": "Transaction does not exist"
}
Error Codes
Error Code |
Description |
421 |
Transaction does not exist
|
Create Mandate
The MTN Momo Debit Order API is used accept or receive money and credited to your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/new_mtn_recurring_create_mandate/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (233).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY amount. This is the amount field.
|
frequency_type |
MANDATORY Frequency Type. It has to be one of these: Daily, Weekly, Monthly, Yearly
|
frequency |
MANDATORY Frequency. The frequency at which schedules are generated for the frequencyTypes.
|
start_date |
MANDATORY Start Date. Commencement date for the recurring payment [Default: today]
|
end_date |
MANDATORY End Date. Terminal date for the recurring payment [Default: infinte]
|
debit_day |
MANDATORY Debit Day. The day of the month the deductions should be carried out. It is a required field for the frequencyTypes for weekly and above
|
mandate_creation_call_back_url |
MANDATORY Mandate Creation Call Back URL. For every call to create a mandate, a pre-approval request is sent to MTN to prompt the user to either authorize or decline the recurring payment per the ova. Upon receiving the user's decision, the API sends a callback to the third party application.
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the mandate went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
debit_customer_call_back_url |
MANDATORY Debit Customer Call Back URL. For every debit, a callback is sent to the third party application as a means of informing the third party on the outcome of the transaction.
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
"customer_number": "23324*********",
"transaction_id": "764545786777",
'client_id': 8,
"frequency_type":"Daily",
"frequency":"1",
"start_date":"2018-07-16",
"end_date":"2019-07-16",
"debit_day":"30",
"mandate_creation_call_back_url":"https://yourapp.com/mtn_mandate_creation_callback/",
"debit_customer_call_back_url":"https://yourapp.com/mtn_debit_customer_callback/",
"amount": "0.1",
'description': 'awesome description',
}
Response - 200
{
"success": True,
"results": "Transaction is being processed"
"error_code": None
}
Response - Failure
{
"success": False,
"error_code":400,
"message": "Mandate creation failed",
"data": {
"message": "Mandate creation failed",
"status": "failed",
"transaction_id": "675687687789689"
}
}
Update Mandate
The MTN Momo Debit Order API is used accept or receive money and credited to your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/new_mtn_recurring_update_mandate/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (233).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY bundle amount. This is the amount field of the bundle selected from the MTN data product id list API.
|
frequency_type |
MANDATORY Frequency Type. It has to be one of these: Daily, Weekly, Monthly, Yearly
|
frequency |
MANDATORY Frequency. The frequency at which schedules are generated for the frequencyTypes.
|
start_date |
MANDATORY Start Date. Commencement date for the recurring payment [Default: today]
|
end_date |
MANDATORY End Date. Terminal date for the recurring payment [Default: infinte]
|
debit_day |
MANDATORY Debit Day. The day of the month the deductions should be carried out. It is a required field for the frequencyTypes for weekly and above
|
mandate_id |
MANDATORY Mandate ID. Identifier for the mandate
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
"customer_number": "23324*********",
"transaction_id": "76454675786777",
'client_id': 8,
"frequency_type":"Daily",
"frequency":"1",
"start_date":"2018-07-16",
"end_date":"2019-07-16",
"debit_day":"30",
"mandate_id":"009",
"amount": "0.1",
'description': 'awesome description updated',
}
Response - Success
{
"success": True,
"data": {
"message": "Mandate update successful",
"status": "success",
}
},
"message": "Mandate update successful"
}
Cancel Mandate
The MTN Momo Debit Order API is used accept or receive money and credited to your Partner Wallet (OVA).
POST
https://xchange.korba365.com/api/v1.0/new_mtn_recurring_cancel_mandate/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (233).
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
mandate_id |
MANDATORY Mandate ID. Identifier for the mandate
|
description |
OPTIONAL description of your transaction. Bundle Name can be used
|
Request Example
{
"customer_number": "23324*********",
"transaction_id": "76754545786777",
'client_id': 8,
"mandate_id":"009",
'description': 'awesome description updated',
}
Response - Success
{
"success": True,
"data": {
"message": "Mandate cancel successful",
"status": "success",
}
},
"message": "Mandate cancel successful"
}
Cancel Pre Approval
This cancels automatic debits on a customers wallet.
POST
https://xchange.korba365.com/api/v1.0/new_mtn_recurring_cancel_pre_approval/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer mobile number beginning with (233).
|
Request Example
{
"customer_number": "23324*********",
}
Response - Success
{
"success": True,
"data": {
"message": "Pre-Approval cancellation successful",
"status": "success",
}
},
"message": "Pre-Approval cancellation successful"
}
Utilities Validate User
The Utilities Validate User API is used to check for information on the account holder. It is advisable to validate a user before making a payment.
POST
https://xchange.korba365.com/api/v1.0/utilities_validate_user/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY Utilities customer number.
|
bill_type |
MANDATORY Bill Type. This should be one of the following DSTV, KWESETV, GBCTV, ECG, GOTV, STARTIMES
|
transaction_id |
MANDATORY Unique ID generated by your system
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
Request Example
{
"bill_type": "DSTV",
'client_id': 8,
'customer_number': '702*******4',
'transaction_id': '085694478'
}
Response - Success
{
"results": {
"message": "ANTHONY BASSAW-5.00",
"totalSuccess": "0",
"amount": "0.0",
"totalFailed": "0",
"closingBalance": "0.0",
"korbaTransId": "1537274959004",
"error": "0",
"openingBalance": "0.0",
"etranzactTransId": "09FG09181246020216043"
},
"error_code": null
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Duplicate transaction id"
}
Utilities Pay Bill (DSTV / GOTV / STARTIMES / ECG)
The Utility Pay Bill API is used to pay bills
POST
https://xchange.korba365.com/api/v1.0/utilities_pay_bill/
POST Parameters:
Parameter |
Description |
customer_number |
MANDATORY customer number.
|
bill_type |
MANDATORY Bill Type. This should be one of the following DSTV, KWESETV, GBCTV, ECG, GOTV, STARTIMES
|
transaction_id |
MANDATORY Unique ID generated by your system
|
sender_name |
MANDATORY sender_name from the validate_user response
|
address |
MANDATORY address.
|
client_id |
MANDATORY Client ID. This can be found on the merchant dashboard under API/Website Creds
|
amount |
MANDATORY amount.
|
callback_url |
MANDATORY Callback URL that is called when the transaction is completed. Until you a receive a callback a transaction is not completed. Only a callback or a status check can confirm a transaction as complete
CALLBACK PARAMETERS
transaction_id = unique ID initially provided by you status = returns the string SUCCESS or FAILED message = details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
|
description |
OPTIONAL description of your transaction.
|
payer_name |
OPTIONAL payer name for the transaction.
|
extra_info |
OPTIONAL extra information of the transaction.
|
Request Example
{
"bill_type": "DSTV",
'client_id': 8,
'customer_number': '70*******4',
'sender_name': 'ANTHONY BASSAW',
'address': 'Accra',
'amount': '1.0',
'transaction_id': '986887909',
'callback_url': 'https://my_awesome_callback/'
}
Response - Success
{
"results": "Transaction initiated successfully.",
"error_code": null,
"success": true
}
Response - Failure
{
"success": false,
"error_code": 405,
"error_message": "Duplicate transaction id"
}
Error Codes
Error Code |
Description |
400 |
Customer Number was not provided
|
401 |
Unique Transaction ID was not provided
|
402 |
Amount was not provided
|
404 |
Callback URL was not provided
|
405 |
Duplicate Transaction ID
|
406 |
Invalid Callback URL
|
407 |
Invalid Amount
|
408 |
Invalid customer number format
|
409 |
You do not have enough funds to perform this action
|
Korba Xcheckout
Korba XCheckout provides you a hosted Checkout page that allows you to collect payment details from your payer through an interaction hosted and displayed by the Korba Payment Gateway. XCheckout is simple and quick to integrate. You do not need to handle or store any payment details
Pre requisites
Ensure that you enable XCheckout on the dashboard under the developer section by generate a website token.
It is recommended that you add a callback URL on the merchant dashboard receive notifications when the payment is successful or fails
<html>
<head>
<script src='https://paywithkorba.s3-eu-west-1.amazonaws.com/checkout.js'></script>
<script type="text/javascript">
XCheckout.configure({
merchantID: '<your_merchant_id>',
orderID: '<unique_order_id>',
description: 'Ordered goods',
amount: 1.2,
redirectURL: 'http://www.yourawesomeapp.com',
});
</script>
</head>
<body>
...
<input type="button" value="Pay" onclick="XCheckout.pay();" />
...
</body>
</html>
Parameters:
Parameter |
Description |
merchantID |
Your XCheckout Merchant ID found on the merchant dashboard as WEBSITE ID
|
orderID |
A unique order ID provided by you to uniquely identify your transaction
|
description |
A short description of your order or transaction
|
amount |
amount to be collected
|
redirectURL |
your users will be redirected to this site after payment
|
Obtain the Payment Results
You will receive a webhook/callback notifications for every payment whether successful or failed via the Callback URL you provide on the merchant dashboard
CALLBACK PARAMETERS
transaction_id
= unique ID initially provided by you
status
= returns the string SUCCESS or FAILED
message
= details of how the transaction went. If it fails the reason for failure will be in the message parameter.
The callback URL is called like so
https://webhook.site/1c4d4a5d?transaction_id=UNIQUE_ID&status=SUCCESS&message=MESSAGE
NB: To ensure the integrity of the callback a custom http header X-Callback-Token
is added to the request and its value is also found on the merchant dashboard called CALLBACK TOKEN You are entreated to add this extra check as a security measure
OVA Balance
This endpoint enables you to check your OVA Balance.
POST
https://xchange.korba365.com/api/v1.0/get_ova_balance/
POST Parameters:
Parameter |
Description |
client_id |
MANDATORY Client ID provided via the dashboard credentials
|
Request Example
{
"client_id": "2"
}
Sample Response - Success
{
"success":true,
"ova_balance":1480.5
}
Fetch Transactions
This endpoint enables you to fetch your transactions.
POST
https://xchange.korba365.com/api/v1.0/client_transactions/
POST Parameters:
Parameter |
Description |
client_id |
MANDATORY Client ID provided via the dashboard credentials
|
Request Example
{
"client_id": "2"
}
Sample Response - Success
{
"success":true,
"count":5078,
"next":"https://xchange.korba365.com/api/v1.0/client_transactions/?page=2",
"previous":null,
"results":[
{
"korba_transaction_id": "COL00034543",
"client_transaction_id": "00034543",
"network_code":"AIR",
"time_created":"2022-04-04T20:34:24.139548",
"credit_amt":"10.10",
"debit_amt":"10.10",
"transaction_status":"failed",
"exchange_message":"No Message found",
"extra_info":"",
"bundle_id":"",
"description":"",
"momo_id":"",
"recipient_bank_account_name":"",
"recipient_bank_name": "",
"recipient_bank_account": "",
"payer_name": "",
"ova_balance_before":"1480.50",
"ova_balance_after":"1480.50",
"customer_number":"0262186242",
},
{
"korba_transaction_id": "DIS00034543",
"client_transaction_id": "00034543",
"network_code":"ISP",
"time_created":"2022-04-04T20:34:24.139548",
"credit_amt":"10.10",
"debit_amt":"10.10",
"transaction_status":"failed",
"exchange_message":"No Message found",
"extra_info":"",
"bundle_id":"",
"description":"",
"momo_id":"",
"recipient_bank_account_name":"",
"recipient_bank_name": "",
"recipient_bank_account": "",
"payer_name": "",
"ova_balance_before":"1480.50",
"ova_balance_after":"1480.50",
"customer_number":"0262186242",
}
]
}