What a session can sell
Provide exactly one of the following:
To store a payment method without charging, set
"checkout_intent": "vault" and omit all three; the checkout collects and vaults a card for later use, such as invoice autopay.
One-off sessions (line_items or amount) are invoiced with zero tax so the invoice total equals what the customer was charged. Plan sessions calculate tax per your tax configuration from the address entered at checkout.
Free trials
When the plan has a trial period, checkout takes no payment until the trial ends. The trial comes from the plan the buyer picks.- Nothing is charged at checkout. The session’s
amountis0, and checkout saves the buyer’s card instead of charging it. This works for a new buyer too: the customer account is created when checkout completes. - The subscription starts in its trial. No first invoice is issued or paid at checkout.
- The first invoice is issued when the trial ends. It carries the plan’s charges and tax, and autopay charges the saved payment method.
- Changing plan updates the trial. If the buyer changes plan or quantity in a self-serve flow, the trial and the amount due follow the new plan.
Who the buyer is
Creating a session
Via the API
url in the response. Other useful request fields:
Reference: Create a checkout session.
Via the dashboard
Create a purchase checkout session through the API above. The dashboard does not offer a Create Checkout Session action. For an existing customer paying an invoice, open Customers, select the customer, and choose Actions → Share Customer Portal. Configure the portal access and copy the link or send it by email. See Customer Portal. To collect payment details for future invoices, choose Actions → Request Billing Information on the customer. This collects billing information; it does not create a purchase checkout or charge the customer.Session lifecycle
GET /checkout-sessions/{id} returns the session with its status:
Sessions are immutable snapshots of what is being sold. To change the price or plan, create a new session. Reference: Get a checkout session.
Checkout flow
Handling completion
Treat the redirect tosuccess_url as a UI signal only — fulfil from the server:
- Webhook — subscribe to
checkout.session.completed. The payload carries the sessionid,amount,currency,accountId,paymentId,invoiceId,subscriptionId(plan sessions) and yourclientReferenceId. See Webhooks. - Polling —
GET /checkout-sessions/{id}untilstatusissuccessfuland the fulfilment IDs are present.
successful with a subscriptionId means the subscription exists — not necessarily that it is live. Read it with GET /subscriptions/{id} and check its own status before granting access; if your organization uses approval flows, a new subscription can land in pending_approval rather than active. See Subscription statuses.
Payment methods, tax and branding
- Payment methods are the ones your connected processor supports and you have enabled under Settings → Workflows → Payments → Payment Methods — cards through Stripe, and ACH where enabled. 3-D Secure and other processor-driven authentication run inside the checkout.
- Tax on plan checkouts follows your tax configuration and the address entered at checkout.
- Branding — logo, colors and brand slug — comes from Settings → Organization → Customizations → Branding; see Branding. Serve checkout from your own domain with Custom domains.
Security
- Card data is entered on Alguna’s origin and passed to the payment processor; it never touches your servers
- Sessions are single-use, expire automatically, and cannot be reused after completion
- Only the session
urlis safe to expose; your API key stays on your server
Best practices
Pass what you know
Send
customer_id/customer_alias or a customer object so the buyer is not asked for details you already have.Keep sessions short
Use
expires_in_seconds in the hour range for cart-specific links; mint a new one if it expires.Fulfil from the webhook
Provision on
checkout.session.completed, matched by clientReferenceId, not on the redirect.Test in sandbox
Run the full flow with your processor’s test cards before going live.
Troubleshooting
Checkout does not load — the session has expired, or the plan is not active. Create a new session. Payment failed — the customer’s bank declined the charge; the checkout shows the processor’s reason and lets them try another method. Customer not redirected — checksuccess_url is set on the session and publicly reachable; the checkout.session.completed webhook still fires either way.
Next steps
Embedded checkout
Render the same checkout inside your own page.
Hosted checkout integration guide
Dashboard-first walkthrough.
Customer portal
Self-service after the first payment.
Launch self-serve
Trials, credits, checkout and portal in one flow.