HomeGuidesAPI ReferenceChangelog
Terms of Use
API Reference

Transaction / Request refund

Requests a full or partial refund of a transaction from its payment processor and returns the created refund. The same rules apply as for refunds requested from the admin panel.

The refund is created before the payment processor is called, so the response always describes a stored refund that can be read later through the transaction refunds resource. Most payment processors confirm a refund asynchronously: follow the refund's status through the transaction refunds resource, using lastUpdatedAfter to pick up changes.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

The transaction ID to which the action will be applied

Body Params
number
required

Tax-inclusive amount to refund, in the currency of the transaction. Must be greater than zero, must not exceed the remaining refundable amount of the transaction, and must not have more decimal places than the currency allows; amounts are never rounded.
When the payment processor of the transaction supports only full refunds, the amount must equal the remaining refundable amount.

string
enum
required

Reason for the refund:

  • duplicate: The transaction was a duplicate charge
  • fraudulent: The transaction was fraudulent
  • requested_by_customer: The customer asked for the refund
Allowed:
string
length ≤ 1000

Operator-facing notes about the refund. Not visible to the customer.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json