Skip to content

Order Confirmation

| View as Markdown

This API can PULL transaction updates like transaction status to the merchant host after the order is confirmed. This API will work only on live MID, for the sandbox MID this API will not work.

https://kraken.airpay.co.in/airpay/pay/v4/api/verify/?token=<access_token>
ParameterType ValueDescriptionValue Like
Content-Type requiredStringThe Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data.application/x-www-form-urlencodeds
ParameterType ValueDescriptionValue Like
orderid optionalAlphanumeric
(1-30)
Merchant generated transaction id. (Either orderid or ap_transactionid or rrn is required)ORD12345
ap_transactionid optionalAlphanumericairpay transaction id. (Either orderid or ap_transactionid or rrn is required)123456
rrn optionalNumericRetrieval Reference Number. (Either orderid or ap_transactionid or rrn is required)556677
terminal_id optionalNumeric
(8)
POS terminal id
txn_type optionalAlphanumericType of transaction. e.g. pos
ParameterType ValueDescriptionValue Like
ap_transactionid requiredNumericairpay transaction reference number11314
merchant_id requiredNumericMerchant ID123356
orderid requiredAlphanumericorderid you have send to airpay systemORDER123456
amount requiredNumericTransaction amount100.00
transaction_status requiredNumericTransaction Payment Status
200 - Transaction is success
211 - Transaction is processing
400 - Transaction is failed
401 - Transaction will not register properly
402 - Payment that has not yet been processed
403 - Not received any call back from bank
405 - Transaction has bounced
503 - No records found
200
merchant_name optionalAlphanumericResponse message received from payment gateway
wallet_balance optionalAlphanumericRemaining balance in wallet (only in case of wallet transactions)
surcharge_amount optionalAlphanumericAdditional charges for particular transaction (sending only if applicable)
settlement_date optionalDateSettlement Date
billed_amount optionalNumericBilled amount
terminal_id optionalNumericTerminal Id (only in case of POS transactions)
pos_entry_mode optionalNumericPOS entry mode (only in case of POS transactions)
cc_expiry optionalNumericCard Expiry (only in case of POS transactions)
rrn optionalAlphanumericRRN
In case of sale completion it is required.
message requiredAlphanumericResponse message received from payment gatewaySuccess
chmod requiredAlphanumericChanel of Payment donepg
bank_name optionalAlphanumericName of the bank, this field is available in pg
token optionalAlphanumericToken
carduniquecode optionalAlphanumericCard unique code (applicable only for pg,emi,pos,onclick )
bank_response_msg optionalAlphanumericResponse message from the bank
reason optionalAlphanumericFailed Reason
transaction_reason optionalAlphanumericTransaction reason
customer_bank_balance optionalAlphanumericCustomer bank balance
customer_name optionalAlphanumericCustomer Name
customer_phone optionalAlphanumericCustomer Phone
customer_email optionalEmailCustomer Email
customer_vpa optionalAlphanumericVPA will return if channel is upi
risk optionalBooleanIf the transaction is at risk 1, otherwise 0.
currency_code optionalNumericPayment Currency
Indian Rupee - 356
356
transaction_type optionalNumericTransaction Type (length 3)
Mandate approved, Auth - 310
Sale - 320
Capture - 330
Refund - 340
Chargeback - 350
Reversal - 360
SaleComplete - 370
SaleAdjust - 380
TipAdjust - 390
Sale+Cash - 400
Cashback - 410
Void - 420
Release - 430
Cashwithdrawal - 440
Awaiting Confirmation - 450
transaction_time optionalDateTransaction Time
subscription_id optionalNumericsubscription id if enabled subscription
subscription_next_rundate optionalDateNext subscription date if subscription transaction
campaign_id optionalNumericCampaign ID
campaign_title optionalAlphanumericCampaign Title
campaign_discount optionalNumericCampaign Discount
charged_amount optionalNumericAmount Charged
auth_id optionalNumericAuthentication ID
ipn_id optionalNumericIPN request ID
transaction_payment_status requiredAlphanumericTransaction payment status
Transaction Payment Status are: SUCCESS,INCOMPLETE,FAIL,INPROCESS,Mandate Approved,AUTHORIZE,AUTHORIZATION,CAPTURE,VOIDED,RISK
SUCCESS
card_number optionalCharMasked card number (length 12-19)\
card_country optionalAlphanumericCard issued country, this field is available in pg
card_type optionalAlphanumericType of Card Credit/Debit/Unknown
card_scheme optionalAlphanumericCard issuer name, this field is available in pg
emi_tenure optionalNumericEMI Tenure (length 2)
3 Months - 3
6 Months - 6
9 Months - 9
12 Months - 12
18 Months - 18
24 Months - 24
conversion_rate optionalNumericConversion rate
ap_SecureHash requiredAlphanumericSecure hash generated by airpay1490948220
customvar optionalAlphanumericAny information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in ‘CustomVar’ separated by the '' symbol. Eg: 1234567
original_currency optionalNumericOriginal currency
original_fxrate optionalNumericForeign currency exchange rate
utr_no optionalAlphanumericUnique Transaction Reference No (length 16-22)
<?php
$merchant_id = "<merchant_id>";
$username = "<username>";
$password = "<password>";
$secret = "<secret>";
$secretKey = '<secretKey>';
$data = array();
$data['orderid'] = "ORD123456";
$data['ap_transactionid'] = "12345678";
$data['rrn'] = "556677";
$privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password);
$encdata = encrypt(json_encode($data), $secretKey);
$checksum = checksum($data);
$payload = [
'merchant_id'=>$merchant_id,
'encdata' => $encdata,
'checksum' => $checksum,
'privatekey' => $privatekey
];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://kraken.airpay.co.in/pay/v4/api/verify/?token=<token>',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $payload
));
$result = curl_exec($curl);
curl_close($curl);
$response = json_decode($result)->response;
?>
HTTP/1.1 200 OK
{
"status_code":"200",
"status":"success",
"response_code":"00",
"message":"Success",
"data":
{
"transaction_payment_status":"SUCCESS",
"merchant_id":"123356",
"orderid":"ORDER123456",
"ap_transactionid":"11314",
"txn_mode":"LIVE",
"chmod":"pg",
"amount":"100.00",
"currency_code":"356",
"transaction_status":200,
"message":"Success",
"bank_response_msg":"Success",
"customer_name":"John Doe",
"customer_phone":"987654321",
"customer_email":"customer@example.com",
"transaction_type":320,
"risk":"0",
"customvar":"0",
"token":"",
"uid":"U123",
"transaction_time":"30-11-2023 12:32:59",
"surcharge_amount":"51.41",
"card_scheme": "visa"
"card_number": "462294XXXXXX3713"
"carduniquecode": "SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi"
"bank_name": "anz bank"
"card_country": "australia"
"card_type": "Credit"
"token":"446FVcGpJbhmlNH4KyFl2He8nblrfeUk"
"ap_SecureHash":"1490948220"
}
}
HTTP/1.1 200 OK
{
{
"status_code":"400",
"response_code":501,
"status":"fail",
"message":"Invalid Merchant Id",
"data":[]
}
}