Payment through Debit/Credit Card
Users would be able to make transactions with the help of e-wallets. They will choose the e-wallet and make the payment.
Request Parameter
Type Of Info | Parameter Name | Type | Datatype | Field Size | Mandatory | Description |
---|---|---|---|---|---|---|
Merchant ID | merchantno | Hidden | Num | - | Yes | The unique merchant secret ID assigned while signing up |
CheckSum | checksum | Text | String | - | Yes | Checksum will be the combination of given data. mer_id|orderNo|od_amt||mobile_no |email||||||redirect_url||||sec_key |
Order ID | order_id | Number | Alphnum | 20 | Yes | This order id will generate at the merchant end. Please add your merchant id at the end of order Id to make it unique. (Without any special character and space |
Currency | currency | Hidden | Char | - | Yes | INR Only |
amount | amount | Text | Num | - | Yes | Users would be able to enter the amount. |
fname | fname | Text | String | 10 | Yes | Users would be able enter their first name. |
lname | lname | Text | String | 10 | Yes | Users would be able to enter their last name. |
Text | String | 20 | Yes | Users would be able to enter their email address. | ||
mobile_no | mobile_no | Text | Num | 12 | Yes | Users would be able to enter their registered mobile no so that they will get |
state | state | Text | String | 10 | Yes | Users would be able to enter the name of state. |
city | city | Text | String | 10 | Yes | Users would be able to enter the name of the city. |
address | address | Text | String | 10 | Yes | Users would be able to enter the address. |
Pincode | pincode | Text | Num | 08 | Yes | Users would be able to enter the Pin Code. |
end point | end_point_url | URL | String | - | Yes | Merchant will get the response on this URL in json format. |
Redirect URL | redirect_url | URL | String | - | Yes | Akonto will redirect to this URL with success or failure response. Ex.your_redirect_url?status=SUCCESS/FAILED |
description | description | Text | String | 10 | Yes | Users would be able to enter the description of the transaction. |
Card Type | card_type | Text | Num | 2 | No | Merchant send card type 1 means debit card and 2 means credit card |
card number | card_number | Text | Num | 16 | Yes | Users would be able to enter the valid card no. |
expiration month | expiration_month | Text | Num | 2 | Yes | Users would be able to enter the valid expiry month of the card. |
expiration year | expiration_year | Text | Num | 4 | Yes | Users would be able to enter the expiration year of the card. |
security code | security_code | Text | Num | 3 or 4 | Yes | Users would be able to enter the CVV code of their card. |
Request Example
Below is form based sample request provided for clarity
Response Example
Array ( [ orderId ] => 0701152914 [ orderAmount ] => 1.00 [ txStatus ] => FAILED [ paymentMode ] => DEBIT_CARD [ txMsg ] => User+pressed+cancel+button. [ txTime ] => 2020-01-11 15:07:35 )
Response Parameter
Parameter Name | Type Of Info | Description |
---|---|---|
orderId | Order ID | This is the order ID of the transaction. |
txStatus | Transaction Status | The status of the transaction i.e. failed, pending, and success. |
orderAmount | Transaction Amount | This is the order amount of the transaction. |
txMsg | Transaction Description | The description of the status of the transaction. |
txTime | Transaction Time | Time of transaction will be shown with the date. |
txCode | Status Code | This is the status code of the transaction and their description as mentioned in the code list. |
Checksum | Checksum | This is the checksum you will received in response with MD5 in string: mer_id|orderAmount|txStatus|txTim e|order_id|sec_key |
PHP Response Example on (Endpoint URL)
<?php //{"orderId":"45543654","orderAmount":"1.00","txStatus":"SUCCESS","paymentMode":"CA RD","txMsg":"Message of transaction","txTime":"DATETIME","txCode":"SUCC200","checksum":"ff24217abc0fd76c1846 0011757f806b"} if(!empty(file_get_contents('php://input'))){ $response = file_get_contents('php://input'); $data = json_decode($response, true); // echo ; print_r($data);die; $myfile = fopen("response.txt", 'a'); $txt = $response."\n"; fwrite($myfile, $txt); fclose($myfile); //Save the response data into to database if successfully done print SUCCESS else FAILED echo "OK"; } ?>
Transaction ID Status API
POST /apisecure/payinTransactionStatus HTTP/1.1 Host: www.akonto.co X-API-KEY: 123run Authorization: Basic Username: akonto_api_version_1 Password: checkout_version_1 Cache-Control: no-cache Postman-Token: 870ca693-3c75-f4a1-a9e1-9164d3681fd5 Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="merchant_no" 1523545 ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="secretkey" 6d4af473873835ad ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="order_id" 3401161127 ------WebKitFormBoundary7MA4YWxkTrZu0gW--
Postman Example for Transaction Status
Code List
Code | Description |
---|---|
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’. |
SUCC200 | When transaction status is ‘SUCCESS’. |
SUCC201 | When transaction status is ‘PENDING’. |
WAIT200 | When transaction status is ‘WAITING’. |
Example Payment Form Code
Please copy and paste this code for Integration
<!-- AkontoPay Products version 1.0 develop by https://www.akontopay.co --> <!-- Please set your merchant ID. Please find "Please set your merchant ID" in this code --> <!-- Please set your merchant secret ID. Please find "Please set your merchant secret ID" in this code --> <!-- Please set your response url. Please find "Please set your response url" in this code --> <!-- This code is an example. How can i recieve our payment response through the AkontoPay if our response url is same. --> <?php $order_id = 1 . rand(99999999,10000000000); $mer_id = 10124; $od_amt = 1; $mobile_no = 123456789; $email = 'abc@gmail.com'; $pay_by = 2; $redirect_url = 'http://localhost/testWebhookURL.php'; $sec_key = '5s4d4a215s8554'; ?> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://www.akonto.co/assets/merchants/js/core/jquery.3.2.1.min.js"></script> <script src="https://www.akonto.co/assets/frontend/js/products.js"></script> <script src="http://localhost/akonto.co/assets/frontend/js/products.js"></script> <link rel="stylesheet" type="text/css" href="https://www.akonto.co/assets/frontend/css/products.css"> </head> <body> <div class="MainDiv"> <!-- <form class="form-group" name="form_data" method="POST" action="http://localhost/akonto.co/virtual-terminal-request"> --> <form class="form-group" name="form_data" method="POST" action="https://www.akonto.co/virtual-terminal-secure-request"> <input class="form-control" type="hidden" name="merchantno" value="15090"> <!-- Please set your merchant ID --> <input class="form-control" type="hidden" name="order_id" value="<?= $order_id; ?>"> <!-- Unique order no every time --> <input class="form-control" type="hidden" readonly name="payment_mode" value="LIVE"> <!-- Please set payment_mode TEST/LIVE --> <h1 class="HeadingForm"><img src="https://www.akonto.co/assets/uploads/logo/150271526520170814.png"></h1> <br> <div class="row"> <div class="WidthFull" style="width:70%; display:none;"> <input class="form-control" type="hidden" name="pay_by" id="pay_by" value=""> <input class="form-control" type="hidden" name="country" value="INDIA"> <input class="form-control" type="hidden" readonly name="currency" value="INR" placeholder="Currency"> </div> <div class="WidthFull" style="width:50%"> <input class="form-control" type="text" name="fname" placeholder="First Name" value="" required> </div> <div class="WidthFull" style="width:50%"> <input class="form-control" type="text" name="lname" placeholder="Last Name" value="" required> </div> <div class="WidthFull" style="width:50%"> <input class="form-control" type="text" name="email" placeholder="Email" value="<?= $email; ?>" required> </div> <div class="WidthFull" style="width:50%"> <input class="form-control" type="text" name="mobile_no" placeholder="Mobile" value="<?= $mobile_no ?>" required> </div> <div class="WidthFull" style="width:50%"> <input class="form-control" type="text" name="address" placeholder="Address" value="" required> </div> <div class="WidthFull" style="width:50%"> <input class="form-control" type="text" name="city" placeholder="City" value="" required> </div> <div id="state"> </div> <div class="WidthFull" style="width:50%"> <input class="form-control" type="text" name="pincode" placeholder="Pincode" value="" required> </div> <div class="WidthFull" style="width:100%"> <input class="form-control" type="hidden" name="end_point_url" placeholder="End Point URL" value="http://localhost/testWebhookURL.php"> <!-- Please set your response url --> </div> <div class="WidthFull" style="width:100%"> <input class="form-control" type="hidden" name="redirect_url" placeholder="Redirect URL" value="http://localhost/testWebhookURLRedirect.php"> <!-- Please set your response url --> </div> <div class="WidthFull" style="width:100%"> <textarea class="textarea" rows="3" name="description" placeholder="Description" value="" required></textarea> </div> </div> <h3 class="">Pay Through</h3> <div class="PaymentType"> <input type="radio" name="payment_type" value="1" required onclick="viewtype(1);" ><span><img src="https://www.akonto.co/assets/frontend/images/svg1.svg" >Card</span> </div> <div id="payment_1" class="upi" style="display:none;"></div> <div class="PaymentType"> <input type="radio" name="payment_type" value="3" required onclick="viewtype(3);" ><span><img src="https://www.akonto.co/assets/frontend/images/svg2.svg" >NetBanking </span> </div> <div id="payment_3" class="upi" style="display:none;"></div> <div class="PaymentType"> <input type="radio" name="payment_type" value="4" required onclick="viewtype(4);" ><span> <img src="https://www.akonto.co/assets/frontend/images/svg3.svg" >Wallet</span> </div> <div id="payment_4" class="upi" style="display:none;"></div> <div class="PaymentType"> <input type="radio" name="payment_type" value="2" required onclick="viewtype(2);" ><span> <img src="https://www.akonto.co/assets/frontend/images/svg4.svg" >UPI </span> </div> <!--UPI PAYMENT--> <div id="payment_2" class="upi" style="display:none;"> <div class="WidthFull" style="width:100%"> <input class="form-control" type="text" name="upi_id" placeholder="UPI id" value="<?= $upi_id; ?>" placeholder="UPI ID"> </div> </div> <div class="row"> <div class="WidthFull" style="width:30%"> <input class="form-control" type="text" readonly name="currency" value="INR" placeholder="Currency"> </div> <div class="WidthFull" style="width:70%"> <input class="form-control" type="text" name="amount" placeholder="Amount" value="<?= $od_amt; ?>" required> </div> </div> <input class="form-control" type="text" name="checksum" value="<?= md5($mer_id.'|'.$order_id.'|'.$od_amt.'|||'.$mobile_no.'|'.$email.'||||||'.$redirect_url.'||||'.$sec_key); ?>" required> <input class="Submit" type="submit" name="send" value="Submit"> </form> </div> </body> </html>