v1

latestOpenAPI 3.1.02026-07-2656258207.2 KB
Refunds

Create a refund

Create a refund

post/refunds

Headers

X-Trace-Idstring

A unique identifier to track this operation. It must be between 12 and 255 characters in length.

X-Idempotency-Keystring

A unique identifier to prevent duplicate requests. It must be between 12 and 255 characters in length.

Request body

amountnumber required

The payment amount in decimals.

charge_idstring required

ID of the charge to refund

metaMeta
reason'duplicate' | 'fraudulent' | 'requested_by_customer' | 'expired_uncaptured_charge' required

Reason for the refund

Example request

{
  "amount": 12.34,
  "reason": "requested_by_customer"
}

Response

OK

status'success' | 'failed'
messagestring

Example response

{
  "data": {
    "amount_refunded": 12.34,
    "reason": "requested_by_customer",
    "status": "new",
    "charge_id": "chg_VnUihmASmF"
  }
}