Checkout API
The Checkout API lets you create payment links (hosted checkout pages) for your customers.
There are two checkout types:
- Shopping cart (
payment_type: 'shopping_cart'): one-time purchase with one or more items - Subscription (
payment_type: 'subscription'): recurring billing on a cron schedule
Creating a Checkout
Create a checkout session with items and redirect URLs:
Subscriptions (recurring)
To create a subscription checkout, set payment_type: 'subscription' and include a subscription object.
Subscription (advanced)
The subscription schedule supports additional optional fields:
allocations: variable per-occurrence amounts (e.g. trial at $0 then normal price)\n-trial_days: delay the first charge by N days\n-timezone: interpret the cron in an IANA timezone (recommended for monthly billing)\n-max_occurrences: hard cap on generated occurrences
Checkout Parameters
Required Parameters
Optional Parameters
Advanced: payout_route (routing funds)
payout_route defines where the funds go after a payment is completed. You can route:
- A fixed amount to a destination, or
- A percentage of the total to a destination
Each destination is a discriminated union called route (by network):
polygon,kusama,tron,bep20(address-based)bloque(to a Bloqueaccount_urn)
Routing costs
network: 'bloque': $0 (no additional cost) after the payment- Other networks (
polygon,kusama,tron,bep20): $0.50 per leg
Example (fixed + percentage)
::::tip
If youāre not doing revenue splits / marketplace flows, you can ignore payout_route.
::::
Checkout Items
Each item in the checkout:
Complete Example
Retrieving a Checkout
Get checkout details:
Public vs authenticated retrieval
- Public: use
retrievePublic(urlId)for landing pages where you only need public fields.\n- JWT/client-secret: useretrieve(urlId)when you have authentication and need the full merchant view.
Canceling a Checkout
Cancel an active checkout:
Checkout Response
When creating a checkout with a secretKey, the response includes a client_secret field. This is a checkout-scoped JWT that should be passed to the frontend along with the checkoutId for browser-side authentication.
Next Steps
- Webhooks - Handle checkout events
- Payment Methods - Configure payment methods