Orders

Refund order items

Changed on

Process a refund for order items. Supports full or partial refunds with optional ticket cancellation.

post/orders/{id}/refund

Request

  • Base URL
    https://api.session.services
  • Auth
    API key in header x-tenant-id

Path parameters

id, string required

Identifier of the order to refund

Example:ord_01jps5cgsfgve5b5g2666kyryh

Request body

object required
fullRefund, boolean

When true, refunds all remaining refundable items. Mutually exclusive with items.

items, object[]

Specific items and quantities to refund. Required if fullRefund is false.

shippingAmount, integer

Amount of shipping to refund in cents. Cannot exceed remaining refundable shipping.

cancelTickets, boolean

Whether to cancel tickets associated with refunded items. Defaults to true.

notify, boolean

Whether to send a refund confirmation email to the customer. Defaults to true.

reason, 'CUSTOMER_REQUEST' | 'DUPLICATE' | 'EVENT_CANCELLED' | 'OTHER' required

Categorized reason for the refund

note, string

Free-form notes explaining the refund

idempotencyKey, string

Client-provided key to prevent duplicate refund processing. Recommended for programmatic refunds.

metadata, object

Custom key-value pairs passed through to the payment gateway

Example request

{
  "items": [
    {
      "orderItemId": "itm_01jps5cgsfwyxj0516571eaf17",
      "quantity": 2
    }
  ],
  "shippingAmount": 500,
  "cancelTickets": true,
  "notify": true,
  "reason": "CUSTOMER_REQUEST",
  "note": "Customer requested refund due to schedule conflict",
  "idempotencyKey": "refund_12345_customer_request",
  "metadata": {
    "supportTicket": "#12345"
  }
}

Response

OK

object required
refund, object required

Example response

{
  "refund": {
    "id": "rfd_01jps5cgsfgve5b5g2666kyryh",
    "request": {
      "idempotencyKey": "refund_12345_customer_request"
    },
    "status": "PENDING",
    "acceptedAt": "2026-12-02T02:43:23.598Z",
    "failedAt": "2026-12-02T02:43:23.598Z",
    "failure": {
      "reason": "Insufficient funds for refund",
      "message": "The refund could not be processed."
    },
    "price": {
      "currency": "AUD",
      "total": 1200,
      "items": 1200
    },
    "reason": "CUSTOMER_REQUEST",
    "note": "Customer requested refund due to schedule conflict",
    "items": [
      {
        "orderItemId": "itm_01jps5cgsfwyxj0516571eaf17",
        "quantity": 2,
        "amount": 1200,
        "ticketIds": [
          "tkt_01jps5cgsg0s32w2pr73vbccde"
        ]
      }
    ],
    "tickets": {
      "cancelRequested": true,
      "cancelled": true,
      "cancelledCount": 2
    },
    "gateway": {
      "provider": "STRIPE",
      "refundId": "re_1234567890abcdef",
      "idempotencyKey": "rfd_01jps5cgsfgve5b5g2666kyryh"
    },
    "actor": {
      "type": "USER",
      "userId": "usr_01jps5cgsd4tzjghtnt45qnhn0"
    },
    "metadata": {
      "supportTicket": "#12345"
    },
    "notification": {
      "requested": true,
      "sentAt": "2026-12-02T02:43:23.598Z"
    },
    "createdAt": "2026-12-02T02:43:23.598Z"
  }
}

Changes

    • breaking

      added the pattern ^ord_[0-9a-z]{26}$ to the path request parameter id

    • breaking

      the items/items/quantity request property type changed from number to integer

    • breaking

      the shippingAmount request property type changed from number to integer

    4 more changes in this revision