Refunding an order
Reimbursing customers by issuing Total or Partial refunds for their orders is available via API.
Issuing refunds can be done on the REST protocol via a POST request to /orders/{RefNo}/refund/ and on SOAP and JSON-RPC protocols via the issueRefund method.
Availability
Refunding an order via API is available for all accounts.
Requirements
Order must be in status COMPLETE
Order must not be older than 3 months
The refunded amount must not be higher than the total amount of the order
Request object
RefNo
Required (string) (only on SOAP and JSON-RPC)
2Checkout generates unique reference numbers for the refunded order.
Amount
Required (double)
The amount refunded for that order. Can be equal to the order amount (for full order refund) or smaller (for partial refunds). The currency of the amount is the same as the currency the order was paid in.
Items
Required (array of RefundItem)
The details of the refunded items.
Items.LineItemReference
Optional (string) 2Checkout product code for the refunded product.
Items.Quantity
Optional (integer) Quantity of product refunded.
Items.Amount
Optional (double) Amount refunded.
Comment
Required (string)
Free text comment for the refund.
Reason
Required (string)
The refund reason; must be one of the default refund reasons or a custom reason defined in the 2Checkout Merchant Control Panel.
Request sample
Response
The API will return a Boolean when issuing refunds.
A true response means that the refund was registered successfully.
Error handling
A full list of errors returned by the issueRefund API method can be found here.
Last updated
Was this helpful?