Orders list
Retrieve a paginated list of orders
Retrieve a cursor-paginated list of orders, optionally filtered by creation date and store. Orders are scoped to your partner account and store (when provided).
Endpoint
GET /v2/partner/orders/{shortcode}/listUse the production or sandbox base URL from API conventions.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <ACCESS_TOKEN> |
Content-Type | Yes | application/json |
Accept-Language | No | Response language. Defaults to en-GB. |
Path parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
shortcode | String | Yes | The organisation's shortcode. | example-school |
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
created-from | String | No | Filters to orders created on or after this date, in YYYY-MM-DD format. Inclusive from midnight UTC. | 2026-03-15 |
created-to | String | No | Filters to orders created on or before this date, in YYYY-MM-DD format. Inclusive to 23:59:59 UTC. | 2026-03-15 |
store-id | String | No | Filters to orders in a specific store. If not provided and the organisation has only one store, that store will be used. | a7881587-55e5-4a39-b75f-cfc5b39de5c3 |
limit | Integer | No (default: 10, max: 100) | Maximum number of orders to return | 10 |
cursor | String | No | Opaque cursor identifying the position from which to continue retrieving orders. Cannot be combined with created-from or created-to. | eyJkYXRlX2NyZWF0ZWQiOi... |
Example request
GET /v2/partner/orders/{shortcode}/list?store-id=a7881587-55e5-4a39-b75f-cfc5b39de5c3&created-from=2026-03-01&created-to=2026-03-31&limit=10Pagination
This endpoint uses cursor-based pagination. If more results are available, the response contains a next_cursor value. Pass this as the cursor query parameter on the next request to retrieve the following page.
The cursor encodes the original date filters, so created-from and created-to must not be repeated when paginating. Providing either alongside a cursor returns a validation error. Only limit can be combined with cursor.
A null next_cursor means there are no further results.
Response
{
"next_cursor": "eyJkYXRlX2NyZWF0ZWQiOi...",
"data": [
{
"order_id": "001a7b06-6ca9-4c05-8d6a-df5d9d9db7e3",
"store_id": "a7881587-55e5-4a39-b75f-cfc5b39de5c3",
"amount": 100,
"status": "completed",
"description": "Order for product XYZ",
"reference": "PENCILS",
"external_id": null,
"line_items": [],
"refunds": [],
"custom_data": {
"additionalProp1": "prop"
},
"payments": [
{
"payment_id": "cb03882b-25a0-45e8-b6f1-aa5cd303f88d",
"amount": 100,
"payment_method": "open_banking",
"status": "failed",
"failure_reason": "INSUFFICIENT_FUNDS",
"date_created": "2025-10-24T14:46:39.264381Z",
"date_modified": "2025-10-24T14:46:39.264381Z"
}
],
"date_created": "2025-10-24T14:46:39.264381Z",
"date_modified": "2025-10-24T14:46:39.264381Z"
}
]
}Response fields
Top-level fields
| Field | Type | Description |
|---|---|---|
next_cursor | String | null | Pass as the cursor query parameter to retrieve the next page. null when there are no further results. |
data | Array | Orders returned by the request, most recently created first. |
Order object
| Field | Type | Description |
|---|---|---|
order_id | String | Unique identifier for the order. |
store_id | String | The store this order belongs to. |
amount | Integer | Order amount in minor units (pence). |
status | String | Current status of the order. Possible values: created, completed, expired, refunded, partially_refunded. |
description | String | null | Description of the order. |
reference | String | null | Reference for the order. Deprecated; use external_id. |
external_id | String | null | The partner's order identifier, as sent on the checkout session. |
line_items | Array | The order's line items. See line-item object. |
refunds | Array | Refunds on the order. See refund object. |
custom_data | Object | Custom data associated with the order. |
payments | Array | Payment attempts on the order, not including refunds. Empty if no payments exist. See payment object. |
date_created | String | UTC timestamp when the order was created. |
date_modified | String | UTC timestamp when the order was last modified. |
reference is deprecated. It's still returned, and will be phased out by the
end of 2026. Use external_id instead.
Line-item object
| Field | Type | Description |
|---|---|---|
line_item_id | String | esenda's identifier for the line item. Use it for line-item refunds. |
external_id | String | As sent on the checkout session. |
description | String | As sent on the checkout session. |
amount | Integer | Amount in minor units (pence). |
amount_refunded | Integer | Total successfully refunded on this line item so far, in pence. 0 if none. |
status | String | Same values as the order status. |
payout_route_id | String | The payout route the line item is paid into, as sent on the checkout session. |
fee_amount | Integer | null | This line item's share of the esenda fee. null until the payment is settled and paid out. See how fees are allocated. |
payout_id | String | null | The payout the line item was settled in. null until paid out. |
Refund object
The order's successful refunds, oldest first. An empty array when the order has no refunds. Refunds that are pending or failed aren't included; use the refunds response to track those.
| Field | Type | Description |
|---|---|---|
refund_id | String | Refund identifier. |
amount | Integer | Total refund amount in pence. |
reason | String | null | Refund reason, if provided. |
date_created | String | ISO 8601 timestamp when the refund was created. |
line_items | Array | The line items refunded, each with line_item_id and the amount refunded, in pence. |
Payment object
| Field | Type | Description |
|---|---|---|
payment_id | String | Unique identifier for the payment. |
amount | Integer | Payment amount in pence. |
payment_method | String | Payment method used for the payment. Possible values: card, open_banking, bacs, bank_transfer. |
status | String | Current status of the payment. Possible values: success, failed, cancelled, refunded, partially_refunded, accepted, processing. |
failure_reason | String | null | Failure reason, if available. Not present on all failed payments. See failure reasons for known values. |
date_created | String | UTC timestamp when the payment was created. |
date_modified | String | UTC timestamp when the payment was last modified. |
How fees are allocated to line items
The esenda fee for a payment is shared across its line items in proportion to their amounts. Each share is rounded down to the penny, and any remainder goes to the largest line item.
The allocation is calculated when the payment is captured. esenda fees aren't returned on refunds, so fee_amount doesn't change after a refund.
Example order
This example shows only the new order fields. One line item has been refunded in full, so the order is partially_refunded. Its fee_amount stays at 150.
{
"order_id": "ord_7d41",
"external_id": "INV-10432",
"status": "partially_refunded",
"line_items": [
{
"line_item_id": "li_8f2a",
"external_id": "INV-10432-1",
"description": "Tuition",
"amount": 115000,
"amount_refunded": 0,
"status": "completed",
"payout_route_id": "8a1f3c52-6b0e-4f0e-9d4f-2f1c7f5b9a10",
"fee_amount": 1725,
"payout_id": "po_3k9d"
},
{
"line_item_id": "li_8f2b",
"external_id": "INV-10432-2",
"description": "Year 9 trip",
"amount": 10000,
"amount_refunded": 10000,
"status": "refunded",
"payout_route_id": "7c2e9f4a-5b3d-4e8a-b5c6-3f1d2b3e4a5c",
"fee_amount": 150,
"payout_id": "po_3k9e"
}
],
"refunds": [
{
"refund_id": "rf_2c11",
"amount": 10000,
"reason": "Trip cancelled",
"date_created": "2026-11-05T10:14:00Z",
"line_items": [
{
"line_item_id": "li_8f2b",
"amount": 10000
}
]
}
]
}Failure reasons
The failure_reason field isn't guaranteed to be present, even on failed payments. The values below are known at the time of writing, and new ones may be added.
| Category | Value |
|---|---|
| Card: declined or restricted | CARD_DECLINED |
RESTRICTED_CARD | |
CARD_BLOCKED | |
CARD_NOT_SUPPORTED | |
ISSUER_UNAVAILABLE | |
| Card: validity | INSUFFICIENT_FUNDS |
EXPIRED_CARD | |
INVALID_CARD | |
INCORRECT_CVV | |
| 3D Secure and authorisation | AUTHENTICATION_REJECTED_BY_CARD_ISSUER_3D_AUTH_FAILED |
CANNOT_AUTHORISE_CARD_3D_AUTH_FAILED | |
AWAITING_3D_AUTHENTICATION | |
AUTHORISATION_CANCELLED | |
AUTHORISATION_NOT_PROVIDED | |
REJECTED | |
| Fraud | SUSPECTED_FRAUD |
VERIFICATION_DECLINED | |
| Transaction | TRANSACTION_NOT_PERMITTED |
TRANSACTION_NOT_FOUND | |
TRANSACTION_TIMED_OUT | |
EXPIRED_PAYMENT | |
PAYMENT_LIMIT_EXCEEDED | |
EXCESSIVE_SURCHARGE | |
| Account | CLOSED_ACCOUNT |
RECURRING_TOKEN_REVOKED |