Skip to main content
Version: 202607

Create order refund record

POST 

/openapi/2026-07/orders/:order_id/refund

Attaches a new refund record to the specified order, declaring how much to refund and on which payment channels. Returns the new refund record id and the associated after-sales (post-sale) record id.

Request

Path Parameters

    order_id stringrequired

    Order ID

Bodyrequired

    refund objectrequired

    Refund request body including amounts, line items, payment channels, and notes

    refund_totalstringrequired

    Total refund amount. If refund_payments is specified, the total equals the sum of all refund_payments amounts

    refund_shipping_totalstring

    Total refund amount for shipping fees

    refund_tipstring

    Refund amount for the tip

    refund_additional_totalstring

    Total refund amount for additional fees

    refund_product_totalstring

    Total refund amount for products

    refund_line_items object[]

    List of refund line items by product line item

  • Array [
  • line_item_idstringrequired

    ID of the order line item being refunded

    refund_item_typeenum

    Refund item type:

    • auto: auto-calculate refund quantity by type
    • shipped: refund only shipped items
    • waiting_ship: refund only items not yet shipped
    quantityint32

    Refund quantity

    return_inventoryboolean

    Whether to restock the refunded items to inventory

  • ]
  • refund_payments object[]

    List of refund amounts per payment channel

  • Array [
  • payment_line_idstringrequired

    ID of the payment channel to refund through

    refund_pricestringrequired

    Refund amount on this payment channel

  • ]
  • refund_additional_prices object[]

    List of refund amounts per additional fee

  • Array [
  • namestringrequired

    Name of the additional fee being refunded

    pricestringrequired

    Refund amount for this additional fee

  • ]
  • notestring

    Refund note from the merchant

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    refund_record_idstring

    Created refund record ID

    post_sale_idstring

    After-sales (post-sale) record generated alongside the refund ID