Skip to content

Refund

| View as Markdown

This API can be used to initiate refund from the merchant’s platform. The partial and full refund can be requested. For partial amount, the amount needs to be filled by the merchant.

https://kraken.airpay.co.in/airpay/api/refundtxn.php
FieldTypeDescription
Content-TypeStringapplication/json
FieldTypeDescription
merchant_idNumericMerchant id (length 1-20) (required)
private_keyAlphanumericPrivate key (length 10-200) (required)
private_key = hash(‘sha256’, secret.’@’.username.’:
modeStringMode “refund” (required)
transactionsArrayTransaction contains Airpay id and Amount (required)
checksumAlphanumericChecksum (length 10-200) (required)
date = YYYY-MM-DD
transactions = [{ “amount”: "",“processor_id”: ""}, { “amount”: "",“processor_id”: "" }]
alldata = merchant_id.mode.transactions.date
Key generated by : key = hash(‘SHA256’,username.”:“.password)
Hash generated by : hash(‘SHA256’, key.’@’.alldata)
HTTP/1.1 200 OK
{
"merchant_id": "1001",
"private_key": "dffoffndfsfddda1ufft",
"mode": "refund",
"checksum" : "sdf67dfsasdfoffndfsfddda563451ufft454",
"transactions": [
{ "amount": "10.00", "processor_id": "5001" },
{ "amount": "15.00", "processor_id": "5002"},
{ "amount": "50.00", "processor_id": "5005"},
{ "amount": "100.00", "processor_id": "5007" },
{ "amount": "300.00", "processor_id": "5006" },
{ "amount": "70.00", "processor_id": "5003" },
{ "amount": "7000.00" ,"processor_id": "5004"}
]
}
FieldTypeDescription
mercidNumericMerchant id
modeStringMode
successStringString “true” or “false”
messageStringrefund message
transactionsAlphanumericTransaction list
airpayid - Transaction ID from airpay
refundairpayid - Child transaction id for this transaction
success - “true” or “false”
message - Refund message
HTTP/1.1 200 OK
{
"mercid": "1001",
"mode": "refund",
"success": "true",
"message": "",
"transactions":[
{ "airpayid": "5001","success": "true" ,"amount": "10.00", "message": "Refund initiated successfully for transaction id 5001 ,child id 500101 with transaction amount 10.00" , "refundairpayid": "500101" },
{ "airpayid": "5002","success": "false","amount": "15.00", "message": "Transaction does not exist." , "refundairpayid": ""},
{ "airpayid": "5005","success": "true", "amount": "50.00", "message": "Refund initiated successfully for transaction id 5005 ,child id 500501 with transaction amount 50.00" , "refundairpayid": "500501"},
{ "airpayid": "5007","success": "false","amount": "100.00","message": "Refund Amount greater than transaction amount.", "refundairpayid": "" }]
}
HTTP/1.1 200 OK
{
"mercid": "1001",
"mode": "refund",
"success": "false",
"message": "Refund amount should be less than or equal to the balanced transaction amount.",
}