Checkout Sessions
Create hosted and embedded checkout sessions.
Hosted mode returns a URL to redirect to. Embedded mode returns a client secret for paysio.mountCheckout().
Embedded Checkout includes email, phone, Quick Checkout, cards, bank accounts, addresses, eligible Apple Pay and Google Pay buttons, and 3D Secure. Wallet availability follows Settings > Checkout automatically, so Embedded Checkout does not need a wallet argument.
Create Checkout Session
Create a hosted or embedded checkout session.
https://paysio.com/api/v1/checkout-sessionsAuthorizations
Secret key (sk_*). Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.
Body
Array of line items. Each item can be { product_id, quantity?, unit_price? } to reference an existing product, or { name, amount, currency?, quantity? } to create an ad-hoc product inline. unit_price (cents) pins the line to that rate: required for open_ended products, optional for one_time ones, not allowed on recurring ones.
URL to redirect to after successful payment
hosted (default) or embedded
Embedded mode only. Defaults to false. Show Paysio line items, totals, tax, shipping, recurring charges, and promo-code controls.
Embedded mode only: editable (default), read_only, or hidden. read_only and hidden require customer_email.
Embedded mode only: editable (default), read_only, or hidden. read_only requires customer_phone; hidden also requires it when phone collection is mandatory.
Embedded mode only: on_input (default), on_load, or disabled. on_load immediately checks customer_email. Remembered sessions resume only for the same email.
Required for embedded mode. Exact HTTPS origins allowed to frame checkout; HTTP localhost is accepted for development.
Optional authoritative email prefill. A remembered Quick Checkout session cannot replace it and resumes only when the emails match.
Optional phone prefill. Quick Checkout SMS uses only a phone already verified on the customer record.
Future ISO timestamp. Embedded defaults to 24 hours, maximum 7 days.
Theme defaults: colors, radii, font family/size, and HTTPS font stylesheets.
Arbitrary key-value metadata
Discount code to auto-apply on the checkout page. The code is validated at session creation and automatically applied when the customer opens the checkout.
Restrict which payment methods this checkout offers: any of card, bank, apple_pay, google_pay. Must include at least card or bank. Omitted = the workspace's configured methods. Always intersected with what the workspace actually supports — this narrows the offered methods, never adds new ones.
Get Checkout Session
Get authoritative session status. Fulfill from this response or payment.completed webhooks, not the browser completion event alone.
https://paysio.com/api/v1/checkout-sessions/:idAuthorizations
Any API key. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.