**Version: 202601**

# Create order refund record

**POST** `/openapi/2026-01/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` string (required)

  Order ID

**application/json**

**Body | Example**

**Body (required)**

- `refund` object (required)

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

  - `refund_total` string (required)

    Total refund amount. If refund\_payments is specified, the total equals the sum of all refund\_payments amounts
  - `refund_shipping_total` string

    Total refund amount for shipping fees
  - `refund_tip` string

    Refund amount for the tip
  - `refund_additional_total` string

    Total refund amount for additional fees
  - `refund_product_total` string

    Total refund amount for products
  - `refund_line_items` object[]

    List of refund line items by product line item

    *   Array \[

    - `line_item_id` string (required)

      ID of the order line item being refunded
    - `refund_item_type` enum

      Refund item type:

      *   `auto`: auto-calculate refund quantity by type
      *   `shipped`: refund only shipped items
      *   `waiting_ship`: refund only items not yet shipped
    - `quantity` int32

      Refund quantity
    - `return_inventory` boolean

      Whether to restock the refunded items to inventory
    *   \]
  - `refund_payments` object[]

    List of refund amounts per payment channel

    *   Array \[

    - `payment_line_id` string (required)

      ID of the payment channel to refund through
    - `refund_price` string (required)

      Refund amount on this payment channel
    *   \]
  - `refund_additional_prices` object[]

    List of refund amounts per additional fee

    *   Array \[

    - `name` string (required)

      Name of the additional fee being refunded
    - `price` string (required)

      Refund amount for this additional fee
    *   \]
  - `note` string

    Refund note from the merchant

```json
{
  "refund": {
    "refund_total": "string",
    "refund_shipping_total": "string",
    "refund_tip": "string",
    "refund_additional_total": "string",
    "refund_product_total": "string",
    "refund_line_items": [
      {
        "line_item_id": "string",
        "refund_item_type": 0,
        "quantity": 0,
        "return_inventory": true
      }
    ],
    "refund_payments": [
      {
        "payment_line_id": "string",
        "refund_price": "string"
      }
    ],
    "refund_additional_prices": [
      {
        "name": "string",
        "price": "string"
      }
    ],
    "note": "string"
  }
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `refund_record_id` string

    Created refund record ID
  - `post_sale_id` string

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

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "refund_record_id": "string",
    "post_sale_id": "string"
  }
}
```
