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

Retrieve a payment session

How to fetch a specific payment session via API

To fetch a single payment session, send a GET request to the /api/2026-05/payment_sessions/:id endpoint, where id is the ID of the resource that you want to retrieve.

Request

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

Example

The following request fetches the payment session identified by the ID "XAyRWNUzyN":

curl -g -X GET \
  'https://yourdomain.commercelayer.io/api/2026-05/payment_sessions/XAyRWNUzyN' \
  -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 single resource object:

{
  "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",
      "percentage_amount_cents": 50.0,
      "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"
    }
  },
  "meta": {
    "trace_id": "69abaa3545913c78132e5578bd26208d44aa9043647d78698fd0021f3958cd74",
    "api_versions": [
      "2026-05"
    ]
  }
}

Last updated