Payout Introduction
Akontopay payouts simplify disbursals for businesses by providing powerful APIs and an easy to use dashboard. Akontopay lets businesses pay instantly with simple in-product integration. Akontopay APIs use AES 128 encryption algorithm for encoding, decoding the request and response.
Payout Payments Flow
An overview of the payouts payment is shown below:
Payout Transaction
Merchants can make payout requests using below request parameters.
URL: https://www.akonto.co/apisecure/payoutTransaction
Request Parameter
Type Of Info | Parameter Name | Mandatory | Description |
---|---|---|---|
Merchant ID | merchantno | Yes | The unique merchant secret ID assigned while signing up |
Merchant Secret Key | secretkey | Yes | Merchant secret Key will be unique for every merchant. |
End Point URL | end point url | Yes | Merchants will enter their endpoint url. |
Customer Order ID | customer order id | No | Merchants can pass their GUID or String in this field. |
Json Object of Parameters | enc_payout_js on | Yes | [{"order_id":"4547200306 611244","bank":"0","trx_t ype":"NEFT","payeename ":"Pankaj joshi","bnf_nick_name":" panku","amount":"1.00"," account_no":"678602010 000983","ifsc":"UBIN0567868"}] |
enc_payout_jso n.obj.order_id | order_id | Yes | This order id will be generated at the merchant. It will be unique and integer only for every request. |
enc_payout_jso n.obj.bank | bank | Yes | It will be 0 in all cases. |
enc_payout_jso n.obj.payeename | payeename | Yes | Users need to write payeename. |
enc_payout_jso n.obj.bnf_nick_name | bnf_nick_name | Yes | Users need to write a beneficiary nickname. |
enc_payout_json.obj.amount | amount | Yes | Users need to enter the amount of the payout. |
enc_payout_jso n.obj.account_no | account_no | Yes | Users need to enter the bank account no. |
enc_payout_json.obj.ifsc | ifsc | Yes | Users need to write IFSC code for beneficiary banks. |
enc_payout_json.obj.trx_type | trx_type | Yes | The Values for this parameter will be NEFT, RTGS, and IMPS. |
Request Example
Below is form based sample request provided for clarity
Encrypted Request Example
curl --location --request POST 'https://www.akonto.co/apisecure/payoutTransaction' \ --header 'X-API-KEY: 123run' \ --header 'Authorization: Basic YWtvbnRvX2FwaV92ZXJzaW9uXzE6Y2hlY2tvdXRfdmVyc2lvbl8x' \ --header 'Cookie: ci_session=h7n0hl554p36v8m5j523o3fi1gh03a9p' \ --form 'merchant_no="15"' \ --form 'end_point_url="enter_your_webhook_url"' \ --form 'secretkey="6d4af35"' \ --form 'enc_payout_json="QithUDU5TTBDVTNtZUEzdTVZeEhNbTNxUFJXblNjQ1pZOVJGUENZ d2tWM2lZazFFR3hqeFJsWVBhanQ4Wk4vMWU5NWVUZ3UxS0hzc3cwa
Xh1azlyU28yb U15UGZEZTkyNERvaTJZVVk3cHVqVWdvVUY2QndlcFlQZjJIL2pHLzh6SDdaM2dvMlR0NG prd2V3M3Zwb29CeUdDbWJnNEVSbkR1VDYxTmkzaUZPUk
9xK0hlUHFRUzNQeTVWbW 54bmk2dVZYWFV6eEVjUTZ2SEEwTUNmMGgyb3R3OXg2Mk5uUElHNCs1czFLc0FnNEFo eXR3ZUs1RE54QW1mdXZUb3huaFM2dkFBNl
JDT0FmS2NrWDFtbStUNEJUVmkvNEtVV TF3NGxjS0QwSkdPRFZlVkJDaXhZNEJYMytTN1Y1ak9rY1hrVWcvb1E9PQ"'
Decrypted Request Example
[{"order_id":"4547200306611244","bank":"0","trx_type":"NEFT","payeename":"Pan kaj joshi","bnf_nick_name":"panku","amount":"1.00", "account_no":"678602010000983 ","ifsc":"UBIN0567868"}]
Response Example
Below is form based sample response provided for clarity
Encrypted Response Example
{ "status": true, "data": "QithUDU5STBFVTdZYUJIeXpiRjVNbkRvTW0rOVc4ZjVmTzFOT0NJbjZSYjJUMTVGRGtETU hWWU1janRyVGN5d1ZOMWVEdytiSkdVdTZsdjVsSFZLSEtldEZpZk1NT1FvekFZbTg3VWE 3WlMySTNrSUZLdFZJSVV4QTNyVXRndjU0Q1RkNXdsVExzVTFyU0
tDM1BvWHJ4N3pKMlhJNUdKNER1RGlnZHVDdGxhNVE5eWVlOEQzWG1EUHYxcWUwbnkvZ2lYRENqNTlibGFE TVZORUpjYzExSjUwK0JhWUcyVFVHNkdjNjJpV0lCRTR
6VDl5ZjRWREtDZ0hlYWY3bm5XO FNLemJINDEvTEJqamNUemxoSHpOcmozN21PQWlhMjl0MnpKeVZrUm9LRkp0VWk2W HdhUmxDUT09", "payment_code": "SUCC200", "message": "Payout transaction is successful." }
Decrypted Response Example
[{"status":"SUCCESS","order_id":"4547646446611244","payment_code":"SUCC200"," message":"","utr":"024203379981"}]
Noted: If the merchant entered customer order id in request then they will get the same in their response.
Response Parameter
Parameter Name | Type Of Info | Description |
---|---|---|
Status | status | This is the status of the transaction of payout. |
order id | Order ID | This order ID will be generated once the request is submitted successfully. |
payment code | Payment code | This is the payment code for the success or failure of the payout. |
message | Message | This message of error/success will be shown here. |
utr | UTR | This will be generated after completion of the request from the bank side. |
Code List
Code | Description | Case |
---|---|---|
ERR401 | Your web-payment mode is not activated. | |
ERR402 | Merchant details are not matched. Please check again. | |
ERR411 | Order Id already exists or your order id format is wrong (Allow Integer only). | |
SUCC202 | When transaction status is ‘FAILED’. | "Invalid bank/branch identifier or network" "Transaction with Reference ID 530400134 failed duringprocessing due to Invalid Account." “Failed” |
SUCC200 | When transaction status is ‘SUCCESS’. | |
SUCC201 | When transaction status is ‘PENDING’. | "PENDING FOR PROCESSING" “Pending” |
SUCC200 | You will get this code outside the query which means that your API request runs successfully. You will get this code for payout transactions only. |
Encryption
ENCODE your string to BASE64 CIPHERING type is AES-128-CTR Bitwise disjunction of the flags is 0 always Encryption IV is 1299567891011121 Encryption_key id MD5 format of your merchant id and secret like MD5(merchant_no+mechant_secret) Use openssl_encrypt for encryption Final encryption is BASE64 of encryption value.
Decryption
Encryption IV is 1299567891011121 Encryption_key id MD5 format of your merchant id and secret like MD5(merchant_no+mechant_secret) Bitwise disjunction of the flags is 0 always CIPHERING type is AES-128-CTR DECODE encrypted data into BASE64 Use openssl_decrypt for decryption Final decryption is BASE64 of decrypted value.
Example of Encryption in PHP and this logic will be used for other languages as well.
$simple_string = base64_encode($json_data_string); $ciphering = "AES-128-CTR"; $iv_length = openssl_cipher_iv_length($ciphering); $options = 0; $encryption_iv = '1299567891011121'; $encryption_key = md5($merchantId.$merchantSecret); $encryption = base64_encode(openssl_encrypt($simple_string, $ciphering, $encryption_key, $options, $encryption_iv)); echo $encryption;
Example of Decryption in PHP and this logic will be used for other languages as well.
$decryption_iv = '1299567891011121'; $decryption_key = md5($merchantId.$merchantSecret); $options = 0; $ciphering = "AES-128-CTR"; $encrypted = base64_decode($json_encrypted_data); $decryption= openssl_decrypt($encrypted, $ciphering, $decryption_key, $options, $decryption_iv); echo base64_decode $decryption);
Payout Transaction Status API
POST /apisecure/payoutTransactionStatus HTTP/1.1 Host: www.akonto.co X-API-KEY: 123run Authorization: Basic YWtvbnRvX2FwaV92ZXJzaW9uXzE6Y2hlY2tvdXRfdmVyc2lvbl8x msCache-Control: no-cache Postman-Token: e76d74f3-bf49-1704-108a-ad925a5c58cc Content-Type: multipart/form-data; boundary= WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="merchant_no" 15 ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="secretkey" 6d4af35 ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="order_id" 1820212019012715 ------WebKitFormBoundary7MA4YWxkTrZu0gW--