Skip to content

Get Token API

| View as Markdown

This API will be used to get token associated with a user which is used on merchant application. We must pass merchant id, private key, buyer’s email, buyer phone and UID in request. If the request has valid details, we will get a success response.

https://kraken.airpay.co.in/airpay/wallet/api/walletGetToken.php
FieldTypeDescription
Content-TypeStringapplication/x-www-form-urlencoded
FieldTypeRequiredDescription
merchant_idNumericYesMerchant ID
private_keyAlphanumericYesPrivate Key (length 10-200). private_key = hash('sha256', secret.'@'.username.':|:'.password)
buyer_emailEmailYesEmail of wallet user (length 6-50)
buyer_phoneNumericSpaceHyphen
UIDAlphanumericSpaceNo
outputFormatAlphanumericSpaceYes
checksumAlphanumericYesmd5(merchant_id.buyer_email.buyer_phone.UID.date('Y-m-d').private_key)
curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/walletGetToken.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merchant_id=18999' \
--data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \
--data-urlencode 'buyer_email=aatest12@gmail.com' \
--data-urlencode 'buyer_phone=9234337892' \
--data-urlencode 'buyer_first_name=test' \
--data-urlencode 'buyer_last_name=test' \
--data-urlencode 'UID=1234' \
--data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09'
FieldTypeDescription
TRANSACTIONSTATUSNumericTransaction 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
MESSAGEAlphanumericResponse 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
CHMODAlphanumericTransaction Channle Mode - wallet
MERCHANTIDAlphanumericMerchant ID
USERNAMEAlphanumericUser name of the wallet
WALLETBALANCEAlphanumericWallet Balance
HTTP/1.1 200 OK
{
"TRANSACTION":
{
"TRANSACTIONSTATUS":200,
"MESSAGE":"Successful",
"CHMOD":"wallet",
"MERCHANTID":,
"CUSTOMEREMAIL":"",
"CUSTOMERPHONE":,
"TOKEN":""
}
}
}
{
<?xml version="1.0"?>
<RESPONSE>
<TRANSACTION>
<TRANSACTIONSTATUS>200</TRANSACTIONSTATUS>
<MESSAGE>Successful</MESSAGE>
<CHMOD>wallet<CHMOD>
<MERCHANTID></MERCHANTID>
<CUSTOMEREMAIL></CUSTOMEREMAIL>
<CUSTOMERPHONE></CUSTOMERPHONE>
<TOKEN></TOKEN>
</TRANSACTION>
</RESPONSE>
}
{
"TRANSACTION": {
"TRANSACTIONSTATUS": "ERROR_CODE",
"MESSAGE": "ERROR_MESSAGE"
}
}
{
<?xml version="1.0"?>
<RESPONSE>
<TRANSACTION>
<TRANSACTIONSTATUS>ERROR_CODE</TRANSACTIONSTATUS>
<MESSAGE>ERROR_MESSAGE</MESSAGE>
</TRANSACTION>
</RESPONSE>
}