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.

https://kraken.airpay.co.in/airpay/pay/v4/api/seamless/?token=<access_token>Request Body
Section titled “Request Body”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| orderid required | Alphanumeric (1-30) | Merchant generated transaction id | ORD1234 |
| amount required | Numeric (1-10 .2) | Amount with two decimals | 100.00 |
| currency_code required | Numeric (3) | Numeric currency code | 356 |
| iso_currency required | String (3) | ISO Currency code | inr |
| buyer_email required | Email (3-50) | Buyer Email | customer@example.com |
| buyer_phone required | Numeric (8-15) | Buyer Phone | 99999999 |
| buyer_firstname required | Alphanumeric (1-50) | Buyer First Name | John |
| buyer_lastname required | Alphanumeric (1-50) | Buyer Last Name | Doe |
| buyer_address optional | Alphanumeric (1-50) | Chapman, 711-2880 Nulla St.] Buyer Address | Cecilia |
| buyer_city optional | Alphanumeric (1-50) | Buyer City | Mankato |
| buyer_state optional | Alphanumeric (1-50) | Buyer State | Mississippi |
| buyer_pincode optional | Alphanumeric (4-8) | Buyer Pincode | 96522 |
| buyer_country optional | Alphanumeric (2-50) | Buyer Country | USA |
| customvar optional | Alphanumeric | Space | Equal (1-4096) |
| chmod optional | Chars | Payment Mode pg - payment gateway upi - UPI Allowed values: pg, upi | pg |
| txnsubtype optional | Numeric | Transaction SubType, type of transaction. Confirms the cardholder’s ability to pay 3 - INR-Moto When a customer makes a card payment over the phone or through mail order Allowed values: 2, 3 | 3 |
| wallet optional | Numeric | Transaction Wallet Default - 0 1 – Load consumer Wallet 2 – Debit consumer wallet Allowed values: 0, 1{1} | 0 |
| card_number required | Numeric (12-19) | Card Number/ or Token in case of tokenized transaction (required for pg and emi). | 6321***3123 |
| card_cvv required | Numeric (3-4) | Card CVV (required for pg and emi) | 123 |
| expiry_mm required | Numeric (2) | Card Card Expiry Month (required for pg and emi) | 12 |
| expiry_yy required | Numeric (2) | Card Expiry Year (required for pg and emi) | 25 |
| savecard optional | Chars (1) | Y – For saving card in tokenized format. | |
| carduniquecode optional | Alphaumeric (3-64) | Card unique code. If channel is “pg” and carduniquecode is not empty | |
| token optional | Alphanumeric (2-30) | Token (if token is enabled) | |
| uid optional | Alphanumeric (1-32) | Unique user identifier from merchant If channel is “ppc” or “nb” or “EMI” | |
| sb_nextrundate optional | Date (20) | Next subscription date (for enabling subscription) (for txnsubtype INR-SI) mm/dd/yyyy date must be current date+1 (t+1) | |
| sb_period optional | Char (1) | Subscription period (for enabling subscription) (for txnsubtype INR-SI) Day/Week/Month/Year/Adhoc | |
| sb_frequency optional | Numeric (1-3) | Subscription frequency (for enabling subscription) (for txnsubtype INR-SI) | |
| sb_amount optional | Numeric (1-10 .2) | Subscription amount (for enabling subscription) (for txnsubtype INR-SI) | |
| sb_isrecurring optional | Numeric (1) | Is subscription recurring (for enabling subscription) (for txnsubtype INR-SI) | |
| sb_recurringcount optional | Numeric (1-3) | Subscription Recurring Count (for enabling subscription and Is Subscription Recurring is Yes , if recurring count is 999 than subscription is set as never ending end date its apply only for enach transaction) (for txnsubtype INR-SI) | |
| sb_retryattempts optional | Numeric (1) | Subscription retry attempts (for enabling subscription) (for txnsubtype INR-SI) | |
| sb_maxamount optional | Numeric (1-10 .2) | Maximum amount can char (for txnsubtype INR-SI) | |
| utility_biller_name optional | Alphanumeric (2-50) | The Utility Biller Name parameter shall be mandatory for transactions with the following Merchant Category Codes (MCCs): 4900, 6012, 6051, 6300, 6513, 8011, 8050, 8062, 8099, 8111, 8211, 8220, 8241, 8244, 8249, 8299, 8351, 9311. | |
| channel required | Alphaumeric | Payment Type pg - pg upi - UPI Allowed values: pg, upi{1-12} | pg |
| mer_dom required | Alphanumeric | Base64 encoded merchant domain. | aHR0cDovL2xvY2FsaG9zdA== |
| domain_url optional | Alphanumeric (1-90) | Domain URL. | http://localhost |
| bank_code optional | Alphanumeric (1-20) | Bank Code | |
| cash_pincode required | Numeric | Pin code for cash payment (required only for cash) | 680192 |
| customer_vpa required | Alphanumeric (1-25) | Customer Virtual Payment Address (required in UPI) | test@okhdfcbank |
| upi_tpv_account optional | Numeric (12-18) | Bank Account number passed within this parameter will be used for restricting the Payments accepted to the UPI Account linked with mentioned bank account number. Any other Bank account used to complete the UPI transaction will be rejected. Please contact the airpay support team to enable this. | |
| upi_tpv_ifsc optional | Alphanumeric (1-11) | The IFSC code of the UPI TPV account number is mandatory if the upi_tpv_account is being activated. | |
| customer_consent required | chars (1) | Consent flag to be sent by Merchant. Allowed values: Y, N | Y |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| ap_transactionid required | Numeric | airpay transaction reference number | 11314 |
| transaction_payment_status required | Alphanumeric | Transaction payment status SUCCESS TRANSACTION IN PROCESS FAILED DROPPED CANCEL INCOMPLETE BOUNCED NO RECORDS | SUCCESS |
| merchant_id required | Numeric | Merchant ID | 123356 |
| orderid required | Alphanumeric | orderid you have send to airpay system | ORDER123456 |
| txn_mode optional | Alphanumeric | Transaction mode LIVE or Sandbox | LIVE |
| chmod required | Alphanumeric | Channel of Payment done | pg |
| amount required | Numeric | Transaction amount | 100.00 |
| currency_code optional | Numeric | Payment Currency | 356 |
| transaction_status required | Numeric | Transaction 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 |
| message required | Alphanumeric | Response message received from payment gateway | Success |
| customer_name optional | Alphanumeric | Customer Name | John Doe |
| customer_phone optional | Alphanumeric | Customer Phone | 987654321 |
| customer_email optional | Customer Email | customer@example.com | |
| transaction_type optional | 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 | 320 |
| risk optional | Boolean | If the transaction is at risk 1, otherwise 0. | 0 |
| billed_amount optional | Numeric | Includes total amount of bill amount with two decimals | 110.00 |
| token optional | Alphanumeric | Token string | 4efaf21c79864ec154babfc494f45fd1f65a570805084965 |
| transaction_time optional | Date | Transaction Time | 30-11-2023 12:32:59 |
| card_scheme optional | Alphanumeric | Card issuer name, this field is available in pg | |
| card_unique_code optional | Alphanumeric | Card unique Code, this field is available in pg | c237b1ba20f5f6cbe32f47e6db1d1d53 |
| bank_name optional | Alphanumeric | Name of the bank, this field is available in pg | AXIS BANK |
| card_country optional | Alphanumeric | Card issued country, this field is available in pg | IND |
| card_type optional | Alphanumeric | Type of Card Credit/Debit/Unknown | cc |
| bank_response_msg optional | Alphanumeric | Response message from the bank | Success |
| reason optional | Alphanumeric | Failed Reason | Fund |
| ap_SecureHash required | Alphanumeric | Secure hash generated by airpay Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME); | 1490948220 |
| custom_var optional | Alphanumeric ( 1-120) | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in custom_var separated by the ' | ' symbol. |
| subscription_id optional | Alphanumeric | Subscription ID, if subscription transaction | |
| subscription_next_rundate optional | Alphanumeric | subscription next run date, if subscription transaction |
<?php$merchant_id = "<merchant_id>";$username = "<username>";$password = "<password>";$secret = "<secret>";$secretKey = '<secretKey>';$data = array();$data['buyer_email'] = 'customer@example.com';$data['buyer_phone'] = '99999999';$data['buyer_firstname'] = 'John';$data['buyer_lastname'] = 'Doe';$data['buyer_address'] = 'Cecilia Chapman, 711-2880 Nulla St.';$data['buyer_city'] = 'Mankato';$data['buyer_state'] = 'Mississippi';$data['buyer_country'] = 'USA';$data['buyer_pincode'] = '96522';$data['orderid'] = 'ORD123456';$data['amount'] = '10.00';$data['channel'] = 'pg';$data['bank_code'] = 'XYZ';
$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/airpay/pay/v4/api/seamless/?token=<access_token>', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload));
$result = curl_exec($curl);
curl_close($curl);$response = json_decode($result)->response;?>Success Response
Section titled “Success 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" } }Error Response
Section titled “Error Response”HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } }