Payment refund

Initiates a refund for a completed WhatsApp Pay transaction on the app, using the reference details supplied in the JSON body.

Request parameters

Path parameters

KeyDescriptionValuesData TypeRequired/Optional
appIdIdentifier of the WhatsApp app the call acts on.6f414190-d45c-4671-bca1-fb6c3018cb13StringRequired

Body

KeyDescriptionValuesData TypeRequired/Optional
reference_idReference id of the original transaction to refundreference-id-07—Required
payment_config_idName of the payment configuration the transaction was taken throughGupshup-testing—Required
amountAmount to refund. All three of its fields are enforced by the provider.——Required
speedProcessing speed. Optional — omit it and the provider applies its default. The speed actually applied is reported back as speed_processed, which may differ.normal—Optional

Sample cURL — Payment refund.

curl --request POST \
  --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/payment/refund' \
  --header 'Authorization: Bearer <UT>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "reference_id" : "YOUR_TRANSACTION_REFERENCE_ID",
  "payment_config_id" : "YOUR_PAYMENT_CONFIG_ID",
  "amount" : {
    "offset" : 100,
    "currency" : "INR",
    "value" : 100
  }
}'

Sample success response (200)

{
  "status": "success",
  "data": {
    "id": "refund-id",
    "status": "pending",
    "speed_processed": "normal"
  }
}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the WhatsApp app the call acts on.

Body Params

Refund request. reference_id, payment_config_id and all three amount fields are enforced by the provider, which rejects a missing one at a time — e.g. "(#100) The parameter amount['value'] is required.". speed is optional.

Refund a WhatsApp Pay transaction

string
required

Reference id of the original transaction to refund

string
required

Name of the payment configuration the transaction was taken through

amount
object
required

Amount to refund. All three of its fields are enforced by the provider.

string
enum

Processing speed. Optional — omit it and the provider applies its default. The speed actually applied is reported back as speed_processed, which may differ.

Allowed:
Responses

Language
Credentials
Bearer
Universal Token (UT)
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json