Refunds a payment that succeeded, to the card it was paid with. It can't be canceled once made. Making a refund costs nothing; the payment's own fee isn't returned.
Endpoint
Request body
| Name | Type | Required | Description |
|---|---|---|---|
payment | string | Required | The payment to refund, pay_.... |
amount | integer | Optional | In cents. Default: all that is left of the payment. |
reason | enum | Required | requested_by_customer, duplicate, fraudulent or other. |
note | string | Optional | For your team; the customer doesn't see it. Required for other. Up to 500 characters, with no card number. |
confirm_duplicate | boolean | Optional | Set it to repeat a refund refused with possible_duplicate: the same amount of the same payment moments ago. |
Example request
Example response
Errors
| Code | When |
|---|---|
invalid_state | The payment didn't succeed, is held (cancel it instead), has a chargeback open, or is in an open batch refund. |
parameter_invalid | The amount is more than what's left to refund. |
possible_duplicate | The same amount of the same payment was refunded moments ago. |