---
title: IPN Callback
description: Receive instant payment notifications with transaction status updates.
---

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.

#### POST

```
https://examplemerchantwebsite.eg/callback
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| Content-Type  required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| merchant_id  required | Numeric | Merchant id of the Merchant in the airpay system | `45` |
| ap_transactionid  required | Numeric | airpay transaction reference number | `4324324` |
| amount  required | Numeric | Amount with two decimals | `1999.00` |
| transaction_status  required | Numeric | Transaction Payment Status200 - Transaction is success211 - Transaction is processing400 - Transaction is failed401 - Transaction will not register properly402 - Payment that has not yet been processed403 - Not received any call back from bank405 - Transaction has bounced503 - No records found | `200` |
| merchant_name  optional | Varchar | Merchant name | `Akkara Industries` |
| wallet_balance  optional | Numeric | Remaining balance in wallet (only in case of wallet transactions) | `2000.00` |
| surcharge_amount  optional | Numeric | Additional charges for particular transaction (sending only if applicable) | `5.00` |
| billed_amount  optional | Numeric | Billed amount | `1200.00` |
| terminal_id  optional | Numeric | Terminal Id (only in case of POS transactions) |
| pos_entry_mode  optional | Numeric | POS entry mode (only in case of POS transactions) |
| cc_expiry  optional | Numeric | Card Expiry (only in case of POS transactions) |
| auth_id  optional | Numeric(`6`) | Authentication CodeIn case of sale completion it is required. |
| token  optional | Alphanumeric | Token |
| card_uniquecode  optional | Alphanumeric | Card unique code (applicable only for pg,emi ) |
| reason  optional | Alphanumeric | Reason |
| transaction_reason  optional | Alphanumeric | Transaction reason |
| card_country  optional | Alphanumeric | Card country |
| conversion_rate  optional | Numeric | Conversion rate |
| message  required | Alphanumeric | Response message received from the payment gateway | `Transaction success` |
| customer_vpa  optional | Alphanumeric | VPA will return if channel is upi |
| ap_SecureHash  required | AlphaNumeric | Secure hash generated by airpayIf 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  required | Numeric | Merchant order ID (length 1-20) |
| customvar  optional | Alphanumeric | Customvar value received from you |
| chmod  required | Alphanumeric | Payment channel used to make paymentppc - Prepaid cardpg - Payment gatewaynb - Netbankingpgcc - Credit cardpgdc - Debit cardcash - Cashemi - EMIrtgs - RTGSupi - UPIbtqr - Bharat QRpayltr - Pay laterva - Virtual accountenach - eNACHremit - Remittancewallet - Walletpos - POSpayltr - paylateraloan - Aloanaeps - AEPS | `pg` |
| bank_name  optional | Alphanumeric | Bank name used to do the transaction |
| card_scheme  optional | Alphanumeric | Card Issuer (length 1-50) |
| customer_name  optional | Alphanumeric | Customer Name |
| customer_email  optional | Email | Customer Email customer@example.com (length 6-50) |
| customer_phone  optional | Numeric | Customer Phone (length 8-15) |
| currency_code  optional | Numeric | Currency Code (length 3) | `356` |
| risk  optional | Numeric | Risk Transaction (0 or 1) |
| transaction_type  optional | Numeric | transaction_typeMandate approved, Auth - 310Sale - 320Capture - 330Refund - 340Chargeback - 350Reversal - 360SaleComplete - 370SaleAdjust - 380TipAdjust - 390Sale+Cash - 400Cashback - 410Void - 420Release - 430Cashwithdrawal - 440Awaiting Confirmation - 450 |
| transaction_payment_status  required | Alphanumeric | Transaction Payment StatusSUCCESSTRANSACTION IN PROCESSFAILEDDROPPEDCANCELINCOMPLETEBOUNCEDNO RECORDS | `SUCCESS` |
| card_number  optional | Chars | Masked card number (length 12-19) |
| card_type  optional | Alphanumeric | Card type (length 5) |
| emi_tenure  optional | Numeric | EMI Tenure (length 2)3 Months - 36 Months - 69 Months - 912 Months - 1218 Months - 1824 Months - 24 |
| transaction_time  optional | Alphanumeric | Transaction datetime d-m-Y H:i:s (length 11) |
| refund_id  optional | Numeric | Refund transaction ID| 235235235

### Success Response

```json
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,
         "refund_id" : 235235235
    }
```