After a customer has made a payment on an invoice, you have the option to refund a part or the total of the amount they paid. It is usually easier to issue a refund from the Dashboard but you can also do it from the server API.
You can issue a full refund when the customer aborts or reverses a transaction (say by returning all the goods they purchased) but we also strongly recommend refunding any payment that you believe to be fraudulent. The reason is that Payment Service Providers (PSPs) will usually handle a refund for free but will impose a fee for a chargeback. If you do not refund the money then the victim of the fraud will most likely place a chargeback, which will cost you money.
A partial refund might be useful when a customer returns some of their purchase or otherwise reverses just a part of the transaction. However, you can also use a partial refund in place of a partial capture when the PSP does not support this. To do this, you can capture the payment in full and then refund the amount you would have left out of the partial capture.
Note that you should specify the amount
in the major unit of your currency rather than the minor unit (so this would mean dollars rather than cents if the currency is USD, for example).
Refund object
List of fields
Field | Type | Description |
---|---|---|
id | string readonly | String value that uniquely identifies the refund. |
transaction_id (Expandable) | string | Transaction for which the refund was issued. |
reason | string | Reason for the refund (customer_request , duplicate or fraud ). |
information | string | Extra information about the refund. |
amount | string | Refund amount applied to the transaction. |
has_failed | boolean readonly | Denotes whether or not this refund failed asynchronously. |
metadata | object | Metadata related to the refund, in the form of key-value pairs (string - string). |
sandbox | boolean readonly | Denotes whether or not this refund was created in the sandbox testing environment. |
created_at | datetime readonly | Date and time when this refund was created. |
invoice_detail_ids | []string | List of invoice detail IDs for which the refund is made. |