Refund order items
Changed onProcess a refund for order items. Supports full or partial refunds with optional ticket cancellation.
Request
- Base URLhttps://api.session.services
- AuthAPI key in header x-tenant-id
Path parameters
Identifier of the order to refund
Request body
When true, refunds all remaining refundable items. Mutually exclusive with items.
Specific items and quantities to refund. Required if fullRefund is false.
Amount of shipping to refund in cents. Cannot exceed remaining refundable shipping.
Whether to cancel tickets associated with refunded items. Defaults to true.
Whether to send a refund confirmation email to the customer. Defaults to true.
Categorized reason for the refund
Free-form notes explaining the refund
Client-provided key to prevent duplicate refund processing. Recommended for programmatic refunds.
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
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 thepathrequest parameterid - breaking
the
items/items/quantityrequest property type changed fromnumbertointeger - breaking
the
shippingAmountrequest property type changed fromnumbertointeger
4 more changes in this revision
- breaking