Skip to content

Seamless Transaction

| View as Markdown

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.

seamless transaction  flow

https://kraken.airpay.co.in/airpay/pay/v4/api/seamless/?token=<access_token>
ParameterType ValueDescriptionValue Like
orderid requiredAlphanumeric
(1-30)
Merchant generated transaction idORD1234
amount requiredNumeric
(1-10 .2)
Amount with two decimals100.00
currency_code requiredNumeric
(3)
Numeric currency code356
iso_currency requiredString
(3)
ISO Currency codeinr
buyer_email requiredEmail
(3-50)
Buyer Emailcustomer@example.com
buyer_phone requiredNumeric
(8-15)
Buyer Phone99999999
buyer_firstname requiredAlphanumeric
(1-50)
Buyer First NameJohn
buyer_lastname requiredAlphanumeric
(1-50)
Buyer Last NameDoe
buyer_address optionalAlphanumeric
(1-50)
Chapman, 711-2880 Nulla St.] Buyer AddressCecilia
buyer_city optionalAlphanumeric
(1-50)
Buyer CityMankato
buyer_state optionalAlphanumeric
(1-50)
Buyer StateMississippi
buyer_pincode optionalAlphanumeric
(4-8)
Buyer Pincode96522
buyer_country optionalAlphanumeric
(2-50)
Buyer CountryUSA
customvar optionalAlphanumericSpaceEqual
(1-4096)
chmod optionalCharsPayment Mode
pg - payment gateway
upi - UPI
Allowed values: pg, upi
pg
txnsubtype optionalNumericTransaction 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 optionalNumericTransaction Wallet Default - 0 1 – Load consumer Wallet 2 – Debit consumer wallet
Allowed values: 0, 1{1}
0
card_number requiredNumeric
(12-19)
Card Number/ or Token in case of tokenized transaction (required for pg and emi).6321***3123
card_cvv requiredNumeric
(3-4)
Card CVV (required for pg and emi)123
expiry_mm requiredNumeric
(2)
Card Card Expiry Month (required for pg and emi)12
expiry_yy requiredNumeric
(2)
Card Expiry Year (required for pg and emi)25
savecard optionalChars
(1)
Y – For saving card in tokenized format.
carduniquecode optionalAlphaumeric
(3-64)
Card unique code. If channel is “pg” and carduniquecode is not empty
token optionalAlphanumeric
(2-30)
Token (if token is enabled)
uid optionalAlphanumeric
(1-32)
Unique user identifier from merchant If channel is “ppc” or “nb” or “EMI”
sb_nextrundate optionalDate
(20)
Next subscription date (for enabling subscription) (for txnsubtype INR-SI) mm/dd/yyyy date must be current date+1 (t+1)
sb_period optionalChar
(1)
Subscription period (for enabling subscription) (for txnsubtype INR-SI) Day/Week/Month/Year/Adhoc
sb_frequency optionalNumeric
(1-3)
Subscription frequency (for enabling subscription) (for txnsubtype INR-SI)
sb_amount optionalNumeric
(1-10 .2)
Subscription amount (for enabling subscription) (for txnsubtype INR-SI)
sb_isrecurring optionalNumeric
(1)
Is subscription recurring (for enabling subscription) (for txnsubtype INR-SI)
sb_recurringcount optionalNumeric
(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 optionalNumeric
(1)
Subscription retry attempts (for enabling subscription) (for txnsubtype INR-SI)
sb_maxamount optionalNumeric
(1-10 .2)
Maximum amount can char (for txnsubtype INR-SI)
utility_biller_name optionalAlphanumeric
(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 requiredAlphaumericPayment Type
pg - pg
upi - UPI
Allowed values: pg, upi{1-12}
pg
mer_dom requiredAlphanumericBase64 encoded merchant domain.aHR0cDovL2xvY2FsaG9zdA==
domain_url optionalAlphanumeric
(1-90)
Domain URL.http://localhost
bank_code optionalAlphanumeric
(1-20)
Bank Code
cash_pincode requiredNumericPin code for cash payment (required only for cash)680192
customer_vpa requiredAlphanumeric
(1-25)
Customer Virtual Payment Address (required in UPI)test@okhdfcbank
upi_tpv_account optionalNumeric
(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 optionalAlphanumeric
(1-11)
The IFSC code of the UPI TPV account number is mandatory if the upi_tpv_account is being activated.
customer_consent requiredchars
(1)
Consent flag to be sent by Merchant.
Allowed values: Y, N
Y
ParameterType ValueDescriptionValue Like
ap_transactionid requiredNumericairpay transaction reference number11314
transaction_payment_status requiredAlphanumericTransaction payment status
SUCCESS
TRANSACTION IN PROCESS
FAILED
DROPPED
CANCEL
INCOMPLETE
BOUNCED
NO RECORDS
SUCCESS
merchant_id requiredNumericMerchant ID123356
orderid requiredAlphanumericorderid you have send to airpay systemORDER123456
txn_mode optionalAlphanumericTransaction mode LIVE or SandboxLIVE
chmod requiredAlphanumericChannel of Payment donepg
amount requiredNumericTransaction amount100.00
currency_code optionalNumericPayment Currency356
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
message requiredAlphanumericResponse message received from payment gatewaySuccess
customer_name optionalAlphanumericCustomer NameJohn Doe
customer_phone optionalAlphanumericCustomer Phone987654321
customer_email optionalEmailCustomer Emailcustomer@example.com
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
320
risk optionalBooleanIf the transaction is at risk 1, otherwise 0.0
billed_amount optionalNumericIncludes total amount of bill amount with two decimals110.00
token optionalAlphanumericToken string4efaf21c79864ec154babfc494f45fd1f65a570805084965
transaction_time optionalDateTransaction Time30-11-2023 12:32:59
card_scheme optionalAlphanumericCard issuer name, this field is available in pg
card_unique_code optionalAlphanumericCard unique Code, this field is available in pgc237b1ba20f5f6cbe32f47e6db1d1d53
bank_name optionalAlphanumericName of the bank, this field is available in pgAXIS BANK
card_country optionalAlphanumericCard issued country, this field is available in pgIND
card_type optionalAlphanumericType of Card Credit/Debit/Unknowncc
bank_response_msg optionalAlphanumericResponse message from the bankSuccess
reason optionalAlphanumericFailed ReasonFund
ap_SecureHash requiredAlphanumericSecure hash generated by airpay Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME); 1490948220
custom_var optionalAlphanumeric
(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 optionalAlphanumericSubscription ID, if subscription transaction
subscription_next_rundate optionalAlphanumericsubscription 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;
?>
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":[]
}
}