Skip to main content

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

API Endpoint Reference

MethodEndpointDescription
POST/v1/checkout_sessionsCreates a new checkout session.
GET/v1/checkout_sessions/:idRetrieves details of a specific checkout session.

Attributes

AttributeTypeDescription
idstringUnique identifier for the checkout session (e.g., chk_test_t23yxf0Vv0M6Xc8lFTcIpaxQ).
account_idstringID of the account associated with the session.
payment_intent_idstring or nullID of the associated payment intent, if any.
success_urlstringURL to redirect after a successful payment.
cancel_urlstringURL to redirect if the payment is canceled.
return_urlstring or nullCustom return URL, if specified.
urlstringCheckout URL where the shopper completes the payment.
amount_subtotalstringSubtotal amount before discounts.
amount_totalstringTotal amount after discounts.
currencystringCurrency of the transaction (e.g., USD).
chainstring or nullBlockchain chain used, if applicable.
selected_tokenstring or nullSelected token for payment, if chosen.
supported_tokensarray of objectsList of supported tokens with chain, currency, and metadata.
modestringMode of the session (e.g., payment or subscription).
discountsarray of objectsApplied discounts, if any.
line_itemsarray of objectsDetails of purchased items.
statusstringCurrent status of the session (e.g., open, completed, expired).
customer_idstring or nullID of the customer, if associated.
customer_emailstring or nullCustomer email, if provided.
csrf_tokenstringCSRF protection token.
descriptionstring or nullOptional description of the session.
metadataobject or nullAdditional metadata, if provided.
exchange_ratestring or nullExchange rate applied, if any.
expired_attimestamp or nullTime when the session expires.
used_attimestamp or nullTime when the session was used.
accessed_attimestamp or nullTime when the session was last accessed.
created_attimestampTime when the session was created.
updated_attimestampTime 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.