Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

List all payment sessions

How to fetch a collection of payment sessions via API

To fetch a collection of payment sessions, send a GET request to the /api/2026-05/payment_sessions endpoint.

Request

GET https://yourdomain.commercelayer.io/api/2026-05/payment_sessions

Example

The following request fetches a collection of payment sessions:

curl -g -X GET \
  'https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token'

On success, the API responds with a 200 OK status code, returning a paginated collection of resource objects:

{
  "data": [
    {
      "id": "XAyRWNUzyN",
      "type": "payment_sessions",
      "links": {
        "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN"
      },
      "attributes": {
        "status": "unpaid",
        "amount_cents": 1000,
        "amount_float": 10.0,
        "formatted_amount": "€10,00",
        "capture_balance_cents": 1000,
        "capture_balance_float": 10.0,
        "formatted_capture_balance": "€10,00",
        "refund_balance_cents": 1000,
        "refund_balance_float": 10.0,
        "formatted_refund_balance": "€10,00",
        "currency_code": "USD",
        "gift_card_code": "cc92c23e-967e-48b2-a323-59add603301f",
        "token": "my-order-ref-123",
        "options": {
          "statement_descriptor": "MY SHOP"
        },
        "vaulting": true,
        "client_data": {},
        "request_data": {},
        "response_data": {},
        "additional_request_data": {},
        "additional_response_data": {},
        "payment_instrument": {
          "issuer": "cl bank",
          "card_type": "visa"
        },
        "expires_at": "2018-01-01T12:00:00.000Z",
        "balance_exceeded_at": "2018-01-01T12:00:00.000Z",
        "created_at": "2018-01-01T12:00:00.000Z",
        "updated_at": "2018-01-01T12:00:00.000Z",
        "reference": "ANY-EXTERNAL-REFEFERNCE",
        "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
        "metadata": {
          "foo": "bar"
        }
      },
      "relationships": {
        "order": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/order",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/order"
          }
        },
        "payment_setting": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/payment_setting",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/payment_setting"
          }
        },
        "payment_wallet": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/payment_wallet",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/payment_wallet"
          }
        },
        "payment_transactions": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/payment_transactions",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/payment_transactions"
          }
        },
        "payment_authorization": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/payment_authorization",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/payment_authorization"
          }
        },
        "payment_void": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/payment_void",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/payment_void"
          }
        },
        "payment_captures": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/payment_captures",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/payment_captures"
          }
        },
        "payment_refunds": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/payment_refunds",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/payment_refunds"
          }
        },
        "attachments": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/attachments",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/attachments"
          }
        },
        "events": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/events",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/events"
          }
        },
        "event_stores": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/relationships/event_stores",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN/event_stores"
          }
        }
      },
      "meta": {
        "created_with_version": "2026-05"
      }
    },
    {
      "other": "... 9 payment_sessions (first page)"
    }
  ],
  "meta": {
    "record_count": 140,
    "page_count": 14,
    "page_size": 10,
    "page_number": 1,
    "trace_id": "69abaa3545913c78132e5578bd26208d44aa9043647d78698fd0021f3958cd74",
    "api_versions": [
      "2026-05"
    ]
  },
  "links": {
    "first": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions?page[number]=1&page[size]=10",
    "next": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions?page[number]=2&page[size]=10",
    "last": "https://yourdomain.commercelayer.io/api/2026-05/payment_sessions?page[number]=14&page[size]=10"
  }
}

Remember that when you fetch a list of resources you get paginated result.

Sortable fields

The list of payment sessions can be sorted by the following fields:

Attributes

  • status

  • amount_cents

  • currency_code

  • gift_card_code

  • expires_at

  • balance_exceeded_at

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

Filterable fields

The list of payment sessions can be filtered by the following fields:

Attributes

  • status

  • amount_cents

  • currency_code

  • gift_card_code

  • token

  • vaulting

  • expires_at

  • balance_exceeded_at

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • order

  • payment_setting

  • payment_wallet

  • payment_transactions

  • payment_authorization

  • payment_void

  • payment_captures

  • payment_refunds

  • attachments

  • events

Last updated