WhatsApp Refund Status API

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.

ParameterDescriptionExample
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 ParameterDescriptionExample
mihpayuidLong 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_numString For each successful transaction – this parameter would contain the bank reference number generated by the bank.305**9158352
request_idLong This parameter contains the request ID value posted by the merchant during the transaction request.11751172957
amtString This parameter contains the original amount which was sent in the transaction request by the merchant.10.00
modeString This parameter contains the mode of the transaction such as credit card, debit card, etc. For more information, refer to Payment Mode Codes.UPI
actionString This parameter contains the action taken on the transaction. The action can be refund.refund
tokenString This parameter contains the Token ID (unique token from the merchant) for the refund request.2020**05secrettokenatur
statusString 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_arnString 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_idString This parameter contains the bank settlement identifier if the amount the settlement.N2232115984**659
amount_settledString The parameter contains the amount settled by the bank to the merchant.null
UTR_noString This parameter contains the merchant Unique Transaction Reference (UTR) number is returned in this parameter.SBIN717020**1388
value_dateString This parameter contains the date at which the bank refunded or released the amount.2021-10-10
refund_modeString 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"
}