Refunds
A refund is a resource used to reverse a charge (partially or entirely) to a customer. This can be due to reasons such as fraud, an erroneous order, or a duplicate charge. A refund must be requested in the same currency that the charge was made in, and the amount refunded must be less then or equal to the amount of the charge. Multiple refunds can be made on the same charge as long as the total refund amount does not exceed the charge amount.
Refunds are processed asynchronously. When created, they will start in the pending
state and then automatically update to a successful
, failed
, or error
status. To be notified of the final state of a refund, you can register a webhook for the REFUND_FINISHED
event.
When a refund is made, the transaction fee for the refunded charge is still charged to the merchant.
Please refer to the test card numbers for test data information.
The refund object
Fields | |
---|---|
id | string (UUID) The unique identifier of the refund. |
store_id | string (UUID) The unique identifier of the store that the charge belongs to. |
charge_id | string (UUID) The unique identifier of the charge that is being refunded. |
status | string The status of the refund. One of pending , successful , failed , error |
amount | number The amount to be refunded. |
currency | string (ISO-4217) The currency of the amount to be refunded. |
amount_formatted | string The amount that was refunded formatted to include a decimal place if there is a minor currency unit. |
reason | string The reason for refunding the customer. Must be one of fraud , duplicate , customer_request or chargeback . A chargeback status cannot be set by a merchant and happens when the charge is rejected by the card company at a later time. |
message | string An additional message on why the refund was made. |
error.code | string The error code of why a charge failed or errored. |
error.message | string A short description of why a a charge failed |
error.detail | string Additional details of why a charge failed |
metadata | json Any user defined metadata associated with the refund. |
mode | stringlive or test . |
created_on | string (ISO-8601) The date the refund was created on. |