Skip to Content

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:write scope. See Authentication.
  • Retrieve the order and note the lineNumber and itemPrice of each line to refund. See Retrieve orders.

Refund types

refundTypeUse it for
RETURNA refund issued for a returned item.
CANCELLATIONA refund issued for a cancellation.
GOODWILLA 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."
    }
  ]
}
FieldRequiredDescription
orderLines[].lineNumberYesLine identifier within the purchase order.
orderLines[].refundAmountYesamount as a string, to preserve precision, and currencyCode (default USD).
orderLines[].refundTypeYesRETURN, CANCELLATION or GOODWILL.
orderLines[].reasonNoExplanation 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: orderLines is empty, a required field is missing, refundType isn't one of the listed values, or reason is longer than 500 characters. Check errors[].pointer for 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 the Retry-After header.

On this page