Esenda
Payout Routes

Payout Routes

List and create payout routes and receive update notifications

List or create the organisation's payout routes, so you can choose which route each line item is paid into. Payout routes are tied to a specific store within an organisation.

A payout route is required on every line item you supply. See embedded checkout session. Payout routes belong to a combination of organisation and store. When a line item uses a payout route, it must belong to the same store as the order.

See Webhooks to receive update notifications.

List payout routes

The GET endpoint has no request body, and its response isn't paginated. To add a route, use Create a payout route.

Endpoint

GET /v2/partner/organisations/{shortcode}/payout-routes

Use the production or sandbox base URL from API conventions.

Path parameters

ParameterTypeRequiredDescription
shortcodestringYesThe organisation's shortcode.

Query parameters

ParameterTypeRequiredDescription
store-idstringNoFilters payout routes to a specific store. If not provided and the organisation has only one store, that store will be used.

Response

Each object in data is one payout route.

FieldTypeDescription
idstringThe identifier to send as payout_route_id on a line item.
store_idstringThe store this payout route belongs to.
external_idstringThe identifier provided when requesting the payout route.
account_numberstringLast four digits of the account number.
currencystringCurrency of the account, for example GBP.
statusstringStatus of the payout route: active or inactive.
{
  "data": [
    {
      "id": "8a1f3c52-6b0e-4f0e-9d4f-2f1c7f5b9a10",
      "store_id": "a7881587-55e5-4a39-b75f-cfc5b39de5c3",
      "external_id": "partner-generated-uuid-alpha",
      "account_number": "****1234",
      "currency": "GBP",
      "status": "active"
    },
    {
      "id": "3e7b9d14-2c5a-4a8f-b061-7d9e4c2a1f38",
      "store_id": "ea6cf5e4-f582-4c2e-ad03-fec41f890183",
      "external_id": "partner-generated-uuid-beta",
      "account_number": "****5678",
      "currency": "GBP",
      "status": "active"
    }
  ]
}

See errors for the error response format.

Create a payout route

Create a payout route for the organisation using its bank account details.

Endpoint

POST /v2/partner/organisations/{shortcode}/payout-routes

Use the production or sandbox base URL from API conventions. The shortcode path parameter is the organisation's shortcode.

Request body

Send a JSON body with Content-Type: application/json.

FieldTypeRequiredDescription
store_idstringNo*The store this payout route belongs to. Required unless the organisation has only one store, in which case it defaults to that store.
external_idstringYesA unique identifier. We will pass this back to you on updates.
sort_codestringYesThe bank account's sort code.
account_numberstringYesThe bank account number.

*If not provided and multiple stores exist, the request will fail.

{
  "store_id": "a7881587-55e5-4a39-b75f-cfc5b39de5c3",
  "external_id": "partner-generated-uuid-alpha",
  "sort_code": "123456",
  "account_number": "12341234"
}

Response

Returns the created payout route as a single object, without a data wrapper. The object has the same fields as a route in the GET response.

{
  "id": "8a1f3c52-6b0e-4f0e-9d4f-2f1c7f5b9a10",
  "store_id": "a7881587-55e5-4a39-b75f-cfc5b39de5c3",
  "external_id": "partner-generated-uuid-alpha",
  "sort_code": "123456",
  "account_number": "****4321",
  "currency": "GBP",
  "status": "active"
}

See errors for the error response format.

On this page