Seamless Transaction Integration
INTEGRATION - Seamless Transaction
Section titled “INTEGRATION - Seamless Transaction”In seamless transaction, the user will be doing the payment from the merchant’s page itself instead of being redirected to airpay’s payment page for completing the payment.
Note: If specific payment modes are specified, only those will be visible to the customer while making a payment.
post
https://kraken.airpay.co.in/airpay/pay/payindexapi.phpHeader
Section titled “Header”| Field | Type | Description |
|---|---|---|
| Content-Type | String | application/x-www-form-urlencoded |
Parameter
Section titled “Parameter”| Field | Type | Required | Description |
|---|---|---|---|
| buyer_email | Yes | Buyer Email (length 6-50) | |
| buyer_phone | Numeric | Space | Hyphen |
| buyer_first_name | Alphanumeric | Space | Yes |
| buyer_last_name | Alphanumeric | Space | Yes |
| buyer_address | Alphanumeric | Space | Yes |
| buyer_city | Alphanumeric | Space | Yes |
| buyer_state | Alphanumeric | Space | Yes |
| buyer_country | Alphanumeric | Space | Yes |
| buyer_pincode | Alphanumeric | Yes | Buyer Pin code (length 4-8) |
| order_id | Alphanumeric | Yes | Order ID (length 1-25) |
| amount | Numeric | Yes | Amount with two decimals (length 1-6 .2) |
| UID | Alphanumeric | Yes | Unique user identifier from merchant |
| channel | Alphanumeric | Yes | Payment Channel (length 1-50) |
| mode | Alphanumeric | Yes | Channel mode (length 1-50) |
| private_key | Alphanumeric | Yes | Private Key (length 10-200) private_key = hash(‘sha256’, secret.’@’.username.’: |
| cash_pincode | Alphanumeric | Yes | Pin code for cash payment |
| txnsubtype | Numeric | No | Transaction SubType, type of transaction (length 1-100) 1 - INR-auth-capture 2 - INR-sale auth 3 - INR-Moto 4 - INR-Moto auth-capture 5 - INR-Sale-dcc 6 - INR-Dcc auth-capture 7 - INR-3 Months 8 - INR-6 Months 9 - INR-9 Months 10 - INR-12 Months 11 - INR-18 Months 12 - INR-SI 13 - INR-24 Months 36 - INR-36 Months 74 - INR-3 Months Debit 75 - INR-6 Months Debit 76 - INR-9 Months Debit 77 - INR-12 Months Debit |
| merchant_id | Numeric | Yes | Merchant ID (length 1-20) |
| chmod | Chars | Yes | Payment Mode upi - UPI Channel cash - Cash Channel |
| checksum | Alphanumeric | Yes | Checksum (length 10-200) alldata = buyer_email.buyerFirstName.buyerLastName.buyer_address.buyer_city.buyer_state.buyerCountry.amount.order_id.uid; Key generated by : key256 = hash(‘SHA256’, username.” Checksum generated by : checksum = hash(‘SHA256’, key256.’@’.alldata.date(‘Y-m-d’)); |
| vpa | Alphanumeric | No | Virtual Payment Address (required in UPI) |
| apiName | Alphanumeric | No | Action (required in UPI) Default - collectVPA |
| mer_dom | Alphanumeric | Yes | Merchant Domain in BASE_64 (length 1-50) |
| currency | Numeric | Yes | Numeric currency code eg: 356 (length 3) |
| isocurrency | Chars | Yes | ISO Currency code eg: INR (length 3) |
| domain_url | Alphanumeric | No | Domain URL (length 1-50) |
| upi_tpv_account | Numeric | No | Bank Account number used for restricting UPI payments to the linked account. Contact Airpay support team to enable this feature. |
| upi_tpv_ifsc | Alphanumeric | No | IFSC code is mandatory if upi_tpv_account is activated. |
Request-Example
Section titled “Request-Example”HTTP POST
"buyer_email": "buyer@example.com", "buyer_phone": 9898989989898, "buyer_first_name": "Sam", "buyer_last_name": "Johan", "buyer_address": "3rd floor, Trust Houseformat toBldg.Dr. E.Borges Road, behind ITC Hotel" "buyer_city ": "Mumbai", "buyer_state": "Maharashtra", "buyer_country": "India", "buyerPinCode": "400083", "order_id": "d3t54978", "amount": 123.45, "UID": "ehrjdsihogfoejroejfrjwfw9f9ewu49r4m4t9rrtj04", "vpa":"geooorge@hdfcbank", "private_key": "91e747ae8fd76152ddba23ae7547e614bdea61d6356a3db679380b1ec4a8b2da", "merchant_id": 767807, "checksum": "d5423b57981330ac8d9c6cd23a378c0d", "currency": 356, "isocurrency": "INR", "mode":"vpa", "channel":"upi", "txnsubtype" : 2, "domainurl":"https://example.nowpay.co.in", "mer_dom":"aHR0cCUzQSUyRiUyRmxvY2FsaG9zdA=="Success 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| TRANSACTIONID | Numeric | orderid you have send to airpay system |
| APTRANSACTIONID | Numeric | airpay transaction reference number |
| AMOUNT | Numeric | transaction amount |
| TRANSACTIONSTATUS | Numeric | Transaction Payment Status Success - 200 Transaction is success Transaction in Process - 211 Transaction in processing Failed - 400 Transaction in failed Dropped - 401 The transaction will not register properly Cancel - 402 payment that has not yet been processed Incomplete - 403 Not recieved any call back from bank Bounced - 405 The transaction has bounced No Records - 503 There is no records found |
| TRANSACTIONPAYMENTSTATUS | Alphanumeric | Transaction payment status SUCCESS TRANSACTION IN PROCESS FAILED DROPPED CANCEL INCOMPLETE BOUNCED RISK NO RECORDS |
| MESSAGE | Alphanumeric | Response message received from payment gateway Success Transaction is success Transaction in Process Transaction in processing Failed Transaction in failed Dropped The transaction will not register properly Cancel payment that has not yet been processed Incomplete Not recieved any call back from bank Bounced The transaction has bounced No Records There is no records found |
| CUSTOMERVPA | Alphanumeric | VPA will return if channel is upi |
| MERCID | Numeric | Merchant ID |
| TXN_MODE | Alphanumeric | Transaction mode LIVE or Sandbox |
| CHMOD | Alphanumeric | Chanel of Payment done |
| CURRENCYCODE | Numeric | Payment Currency |
| CUSTOMER | Alphanumeric | Customer name |
| CUSTOMERPHONE | Numeric | Customer phone number |
| CUSTOMEREMAIL | Alphanumeric | Customer email |
| TRANSACTIONTYPE | Numeric | Transaction 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 |
| RISK | Numeric | If the transaction is at risk 1, otherwise 0. |
| BILLEDAMOUNT | Numeric | Includes total amount of bill amount with two decimals |
| TOKEN | Alphanumeric | token string |
| TRANSACTIONTIME | Date | Transaction Time |
| CARDISSUER | Alphanumeric | Card issur name, this field is available in pg,emi,express payment |
| CARD_NUMBER | Alphanumeric | Card number, this field is available in pg,emi,express payment |
| CARDUNIQUECODE | Alphanumeric | Card unique code, this field is available in pg,emi,express payment |
| BANKNAME | Alphanumeric | Name of Bank, this field is available in pg,emi,pos |
| CARDCOUNTRY | Alphanumeric | Card issued country, this field is available in pg,emi,pos |
| CARDTYPE | Alphanumeric | Type of Card Credit/Debit/Unknown |
| BANKRESPONSEMSG | Alphanumeric | Response message from the bank |
| ap_SecureHash | AlphaNumeric | Secure 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); |
Success-Response
Section titled “Success-Response”HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <RESPONSE> <TRANSACTION> <TRANSACTIONPAYMENTSTATUS> <![CDATA[Authorize]]> </TRANSACTIONPAYMENTSTATUS> <mercid><![CDATA[1899]]></mercid> <TRANSACTIONID><![CDATA[904777]]></TRANSACTIONID> <APTRANSACTIONID><![CDATA[1899]]></APTRANSACTIONID> <TXN_MODE><![CDATA[LIVE]]></TXN_MODE> <CHMOD><![CDATA[cash]]></CHMOD> <AMOUNT><![CDATA[10.00]]></AMOUNT> <CURRENCYCODE><![CDATA[356]]></CURRENCYCODE> <TRANSACTIONSTATUS><![CDATA[200]]></TRANSACTIONSTATUS> <MESSAGE><![CDATA[Success]]></MESSAGE> <CUSTOMER><![CDATA[BACKEND3 RETAILER]]></CUSTOMER> <CUSTOMERPHONE><![CDATA[7710804049]]></CUSTOMERPHONE> <CUSTOMEREMAIL><![CDATA[BACKEND3@AIRPAY.CO.IN]]></CUSTOMEREMAIL> <TRANSACTIONTYPE><![CDATA[310]]></TRANSACTIONTYPE> <TRANSACTIONTIME><![CDATA[03-02-2022 19:16:15]]></TRANSACTIONTIME> <BILLEDAMOUNT><![CDATA[10.00]]></BILLEDAMOUNT> <BANKNAME><![CDATA[cash]]></BANKNAME> <ap_SecureHash><![CDATA[64ec154babfc494f45fd1f65a5708050849]]></ap_SecureHash> </TRANSACTION> </RESPONSE>Failure-Response
Section titled “Failure-Response” HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <RESPONSE> <TRANSACTION> <TRANSACTIONPAYMENTSTATUS><![CDATA[FAIL]]></TRANSACTIONPAYMENTSTATUS> <mercid><![CDATA[19378]]></mercid> <TRANSACTIONID><![CDATA[1643895692]]></TRANSACTIONID> <APTRANSACTIONID><![CDATA[17661509]]></APTRANSACTIONID> <TXN_MODE><![CDATA[LIVE]]></TXN_MODE> <CHMOD><![CDATA[cash]]></CHMOD> <AMOUNT><![CDATA[10.00]]></AMOUNT> <CURRENCYCODE><![CDATA[356]]></CURRENCYCODE> <TRANSACTIONSTATUS><![CDATA[400]]></TRANSACTIONSTATUS> <MESSAGE><![CDATA[Fail]]></MESSAGE> <CUSTOMER><![CDATA[BACKEND3 RETAILER]]></CUSTOMER> <CUSTOMERPHONE><![CDATA[7710804049]]></CUSTOMERPHONE> <CUSTOMEREMAIL><![CDATA[BACKEND3@AIRPAY.CO.IN]]></CUSTOMEREMAIL> <TRANSACTIONTYPE><![CDATA[320]]></TRANSACTIONTYPE> <BILLEDAMOUNT><![CDATA[10.00]]></BILLEDAMOUNT> <TRANSACTIONTIME><![CDATA[03-02-2022 19:14:01]]></TRANSACTIONTIME> <ap_SecureHash><![CDATA[1773029231]]></ap_SecureHash> </TRANSACTION> </RESPONSE>