Skip to content

IPN Callback

| View as Markdown

Instant Payment Notifications (IPN), or callbacks, are the way we notify you of the transaction status updates. This API will call the merchant url and return mercid, aptransaction id, amount, transaction status, merchant name, billed amount, ap_securehash, transaction id, card issuer, currency code etc if successful.

https://examplemerchantwebsite.eg/callback
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/json
ParameterType ValueDescriptionValue Like
merchant_id requiredNumericMerchant id of the Merchant in the airpay system45
ap_transactionid requiredNumericairpay transaction reference number4324324
amount requiredNumericAmount with two decimals1999.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 optionalVarcharMerchant nameAkkara Industries
wallet_balance optionalNumericRemaining balance in wallet (only in case of wallet transactions)2000.00
surcharge_amount optionalNumericAdditional charges for particular transaction (sending only if applicable)5.00
billed_amount optionalNumericBilled amount1200.00
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)
auth_id optionalNumeric
(6)
Authentication Code
In case of sale completion it is required.
token optionalAlphanumericToken
carduniquecode optionalAlphanumericCard unique code (applicable only for pg,emi,pos,onclick )
reason optionalAlphanumericReason
transaction_reason optionalAlphanumericTransaction reason
card_country optionalAlphanumericCard country
conversion_rate optionalNumericConversion rate
message requiredAlphanumericResponse message received from the payment gatewayTransaction success
customer_vpa optionalAlphanumericVPA will return if channel is upi
ap_SecureHash requiredAlphaNumericSecure hash generated by airpay
If Channel is upi,
Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME. : . CUSTOMERVPA); Otherwise,
Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME);
1490948220
orderid requiredNumericMerchant order ID (length 1-20)
customvar optionalAlphanumericCustomvar value received from you
chmod requiredAlphanumericPayment channel used to make payment
ppc - Prepaid card
pg - Payment gateway
nb - Netbanking
pgcc - Credit card
pgdc - Debit card
cash - Cash
emi - EMI
rtgs - RTGS
upi - UPI
btqr - Bharat QR
payltr - Pay later
va - Virtual account
enach - eNACH
remit - Remittance
wallet - Wallet
pos - POS
payltr - paylater
aloan - Aloan
aeps - AEPS
pg
bank_name optionalAlphanumericBank name used to do the transaction
card_scheme optionalAlphanumericCard Issuer (length 1-50)
customer_name optionalAlphanumericCustomer Name
customer_email optionalEmailCustomer Email customer@example.com (length 6-50)
customer_phone optionalNumericCustomer Phone (length 8-15)
currency_code optionalNumericCurrency Code (length 3)356
risk optionalNumericRisk Transaction (0 or 1)
transaction_type optionalNumerictransaction_type
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_payment_status requiredAlphanumericTransaction Payment Status
SUCCESS
TRANSACTION IN PROCESS
FAILED
DROPPED
CANCEL
INCOMPLETE
BOUNCED
NO RECORDS
SUCCESS
card_number optionalCharsMasked card number (length 12-19)
card_type optionalAlphanumericCard type (length 5)
emi_tenure optionalNumericEMI Tenure (length 2)
3 Months - 3
6 Months - 6
9 Months - 9
12 Months - 12
18 Months - 18
24 Months - 24
transaction_time optionalAlphanumericTransaction datetime d-m-Y H:i:s (length 11)
IPN Callback Response
{
"merchant_id": 45,
"ap_transactionid": 4324324,
"amount": 1999.00,
"transaction_status": 200,
"message": "Success",
"ap_SecureHash": ,
"orderid": "ORDER123",
"customvar": ,
"chmod": "pg",
"bank_name": "AXIS BANK"",
"customer_name": "John",
"customer_email": "customer@example.com",
"customer_phone": 9898989989898,
"currency_code": 356,
"risk": "0",
"transaction_type": 310,
"transaction_payment_status": "Authorize",
"card_number": 989 ***** 999,
"card_type": "cc",
"transaction_time": "12-12-2023 10:10:12",
"merchant_name": "Akkara Industries",
"wallet_balance": 2000.00,
"surcharge_amount": 5.00,
"billed_amount": 1200.00,
"rrn": 016153570198200,
"token": "4efaf21c79864ec154babfc494f45fd1f65a570805084965",
"card_unique_code": "c237b1ba20f5f6cbe32f47e6db1d1d53",
"reason": "Fund",
"card_country": "IND",
"conversion_rate": 3.68
}