Skip to main content
POST
/
refunds
Request refund
curl --request POST \
  --url https://api.sandbox.pawapay.io/refunds \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "refundId": "<INSERT_UUID_FOR_REFUND>",
  "depositId": "<INSERT_UUID_OF_DEPOSIT_TO_REFUND>",
  "amount": "15",
  "metadata": [
    {
      "fieldName": "orderId",
      "fieldValue": "ORD-123456789"
    },
    {
      "fieldName": "customerId",
      "fieldValue": "customer@email.com",
      "isPII": true
    }
  ]
}'
{
"refundId": "f4401bd2-1568-4140-bf2d-eb77d2b2b639",
"status": "ACCEPTED",
"created": "2020-10-19T11:17:01Z"
}
Refunds operation allows you to initiate a refund for asynchronous processing.

Learn more!

See what the refund flow looks like with pawaPay.
  • This API call is idempotent, which means it is safe to submit a request with the same refundId multiple times.
  • Duplicate requests with the same refundId will be ignored with the DUPLICATE_IGNORED status in the response.
  • Since the request can be rejected, you must check the status code in the response for each submitted request. The rejectionReason in the response will contain information about the reason of the rejection.
Each request can get one of the statuses on initiation:
StatusDescription
ACCEPTEDYesThe refund request has been accepted by pawaPay for processing.
REJECTEDNoThe refund request has been rejected. See rejectionReason for details.
DUPLICATE_IGNOREDNoThe refund request has been ignored as a duplicate of an already accepted refund request. Duplication logic relies upon refundId.

How to find out the final status of this refund?

As the pawaPay Merchant API is an asynchronous API, you can find out the final status of the ACCEPTED refund by either:
Headers related to signatures must only be included if you have enabled “Only accept signed requests”. Read more about it from the pawaPay Dashboard documentation.

Authorizations

Authorization
string
header
required

Headers

Content-Digest
string<string>
Signature
string<string>
Signature-Input
string<string>
Accept-Signature
string<string>
Accept-Digest
string<string>

Body

application/json
refundId
string<uuid>
required
Required string length: 36
Example:
depositId
string<uuid>
required
Required string length: 36
Example:
amount
string
Required string length: 1 - 23
Example:
metadata
object[]
Example:

Response

refundId
string<uuid>
required
Required string length: 36
Example:
status
enum<string>
required
Available options:
ACCEPTED,
REJECTED,
DUPLICATE_IGNORED
created
string<date-time>
Example:
rejectionReason
object