Refund order lines
Issue seller-initiated refunds for order lines after a return, a cancellation or as a goodwill adjustment.
Issue a refund when a customer returns an item, when you cancel part of an order the customer already paid for, or when you want to make a goodwill adjustment. You refund at the order line level and set the amount and type of each refund.
Before you begin
- Get an access token with the
orders:writescope. See Authentication. - Retrieve the order and note the
lineNumberanditemPriceof each line to refund. See Retrieve orders.
Refund types
refundType | Use it for |
|---|---|
RETURN | A refund issued for a returned item. |
CANCELLATION | A refund issued for a cancellation. |
GOODWILL | A goodwill adjustment. |
Step 1: Issue the refund
Call Issue refunds for order lines. Send at least one line. For each line, send its lineNumber, a refundAmount and a refundType. You can add a reason of up to 500 characters.
POST /v4/orders/1234567891234/refund
Authorization: Bearer <access_token>
Content-Type: application/json{
"orderLines": [
{
"lineNumber": "1",
"refundAmount": { "amount": "19.99", "currencyCode": "USD" },
"refundType": "RETURN",
"reason": "Customer returned item due to defect."
},
{
"lineNumber": "2",
"refundAmount": { "amount": "5.00", "currencyCode": "USD" },
"refundType": "GOODWILL",
"reason": "Late delivery."
}
]
}| Field | Required | Description |
|---|---|---|
orderLines[].lineNumber | Yes | Line identifier within the purchase order. |
orderLines[].refundAmount | Yes | amount as a string, to preserve precision, and currencyCode (default USD). |
orderLines[].refundType | Yes | RETURN, CANCELLATION or GOODWILL. |
orderLines[].reason | No | Explanation for the refund, up to 500 characters. |
Step 2: Store the refund ID
The response returns a refundId and the time the refund was recorded. Store the refundId with the order so you can reconcile it later.
{
"purchaseOrderId": "1234567891234",
"refundId": "RF-5550001",
"refundedAt": "2026-12-05T10:00:00Z"
}Errors and edge cases
400:orderLinesis empty, a required field is missing,refundTypeisn't one of the listed values, orreasonis longer than 500 characters. Checkerrors[].pointerfor the field at fault.404: no order exists for the purchase order ID.429: you exceeded the rate limit. Back off and retry.503: refunds can be temporarily unavailable. Retry after the number of seconds in theRetry-Afterheader.
