This API allows WhatsApp to check refund status for any refund transaction. All of them are mandatory parameters.
Request parameters
Note:
The header must include bearer token.
Parameter | Description | Example |
---|---|---|
merchant_id mandatory | String This parameter must contains MID of the merchant. | 8244519 |
payu_id mandatory | String The partner must post the payu_id of the payment transaction for which the refund request is being raised. | 403**371553**93059 |
reseller_id mandatory | String This parameter must contain the WhatsAppβs reseller uuid. | 11ed-933c-ece48d50-a41d-023f883eb17c |
hash mandatory | String The hash should be calculated with the following logic:sha512(merchant_id|payu_id|client_secret) |
Sample request
Response parameters
JSON Parameter | Description | Example |
---|---|---|
mihpayuid | Long This parameter contains a unique reference number created for each transaction at PayUβs end. You must note this transaction ID as this will be used as a reference for all the future actions on this transaction like Inquiry or Refund. | 7043873219 |
bank_ref_num | String For each successful transaction β this parameter would contain the bank reference number generated by the bank. | 305**9158352 |
request_id | Long This parameter contains the request ID value posted by the merchant during the transaction request. | 11751172957 |
amt | String This parameter contains the original amount which was sent in the transaction request by the merchant. | 10.00 |
mode | String This parameter contains the mode of the transaction such as credit card, debit card, etc. For more information, refer to Payment Mode Codes. | UPI |
action | String This parameter contains the action taken on the transaction. The action can be refund. | refund |
token | String This parameter contains the Token ID (unique token from the merchant) for the refund request. | 2020**05secrettokenatur |
status | String This parameter contains any of the following status to show whether the API command was successful or failed to get response:- failure - If the API command call failed. - success - If the API command call succeeded. | success |
bank_arn | String This parameter contains the Acquirer Reference Number (ARN) is a unique number is generated by the bank. This ARN is generated within 24-72 business hours of initiating the refund. | 74799877**2005071**8062 |
settlement_id | String This parameter contains the bank settlement identifier if the amount the settlement. | N2232115984**659 |
amount_settled | String The parameter contains the amount settled by the bank to the merchant. | null |
UTR_no | String This parameter contains the merchant Unique Transaction Reference (UTR) number is returned in this parameter. | SBIN717020**1388 |
value_date | String This parameter contains the date at which the bank refunded or released the amount. | 2021-10-10 |
refund_mode | String This parameter contains the refund mode. | Back to Source |
Sample response
Success scenario
{
"40**9371**29864745": {
"135848905": {
"settlement_id": null,
"mihpayid": 4039937**529**4745,
"amt": "2.12",
"amount_settled": null,
"token": "whatsapp_basudev_Refund",
"bank_arn": null,
"mode": "NB",
"refund_mode": "Back to Source",
"action": "refund",
"bank_ref_num": null,
"request_id": 1358**905,
"status": "queued",
"UTR_no": null,
"value_date": null
},
"135**3655": {
"settlement_id": null,
"mihpayid": 4039937**529**4745,
"amt": "3.13",
"amount_settled": null,
"token": "whatsapp_basudev_Refund",
"bank_arn": null,
"mode": "NB",
"refund_mode": "Back to Source",
"action": "refund",
"bank_ref_num": null,
"request_id": 1358**655,
"status": "queued",
"UTR_no": null,
"value_date": null
}
}
}
Failure scenarios
- Invalid partner
- Error code=400
Status : BAD_REQUEST(400)
{
"message": "Partner with UUID 121**12213r is not allowed to do this action"
}
- Invalida auth token
- Error code=401
{
"message": "Invalid Auth token"
}
- Invalid hash
- Error code=403
{
"message": "Invalid Hash"
}
- Invalid PayU ID
- Error code=400
STATUS: BAD_REQUEST(400)
{
"40399**15528864745": {
"errorCode": "400",
"description": "0 out of 1 Transactions Fetched Successfully",
"category": "RefundService",
"data": ""
}
}
- Any other issues in middleware
Response Status: INTERNAL_SERVER_ERROR(500)
{
"message": "PayU Internal Server Error"
}