Checkout Sessions Overview
Description
The Checkout Sessions API group simplifies the payment process by providing a hosted checkout solution for stablecoin transactions, supporting USDC and USDT. It’s designed for merchants to create and manage checkout experiences, offering flexibility for both hosted and custom integrations across supported blockchains.
API Endpoints
- Create Checkout Session: Initiates a new checkout session for payment processing.
- Get Checkout Session: Retrieves details of a specific checkout session.
API Endpoint Reference
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/checkout_sessions | Creates a new checkout session. |
| GET | /v1/checkout_sessions/:id | Retrieves details of a specific checkout session. |
Attributes
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier for the checkout session (e.g., chk_test_t23yxf0Vv0M6Xc8lFTcIpaxQ). |
account_id | string | ID of the account associated with the session. |
payment_intent_id | string or null | ID of the associated payment intent, if any. |
success_url | string | URL to redirect after a successful payment. |
cancel_url | string | URL to redirect if the payment is canceled. |
return_url | string or null | Custom return URL, if specified. |
url | string | Checkout URL where the shopper completes the payment. |
amount_subtotal | string | Subtotal amount before discounts. |
amount_total | string | Total amount after discounts. |
currency | string | Currency of the transaction (e.g., USD). |
chain | string or null | Blockchain chain used, if applicable. |
selected_token | string or null | Selected token for payment, if chosen. |
supported_tokens | array of objects | List of supported tokens with chain, currency, and metadata. |
mode | string | Mode of the session (e.g., payment or subscription). |
discounts | array of objects | Applied discounts, if any. |
line_items | array of objects | Details of purchased items. |
status | string | Current status of the session (e.g., open, completed, expired). |
customer_id | string or null | ID of the customer, if associated. |
customer_email | string or null | Customer email, if provided. |
csrf_token | string | CSRF protection token. |
description | string or null | Optional description of the session. |
metadata | object or null | Additional metadata, if provided. |
exchange_rate | string or null | Exchange rate applied, if any. |
expired_at | timestamp or null | Time when the session expires. |
used_at | timestamp or null | Time when the session was used. |
accessed_at | timestamp or null | Time when the session was last accessed. |
created_at | timestamp | Time when the session was created. |
updated_at | timestamp | Time when the session was last updated. |
Status Enum
The status field indicates the current state of the checkout session. Possible values are:
open: The checkout session is active and awaiting payment.completed: The checkout session has been successfully paid.expired: The checkout session has expired due to inactivity.canceled: The checkout session has been canceled.