Create checkout session
POST
https://app.speybooks.com/api/v1/billing/checkoutCreates a Stripe Checkout session for the requested plan and returns the hosted Checkout URL for client-side redirect, plus the session ID for tracking. If the organisation has no Stripe customer, one is created and persisted before the session is opened.
Trial entitlement is decided through a single entry point: a first subscription receives the full trial (90 days while founder seats remain, 30 thereafter), and an organisation that has subscribed before receives no trial and goes straight to billing. The entitlement is a replacement value, never a remaining-days calculation.
Emits a billing.checkout_started audit event.
Body parameters
planstringrequiredPlan to subscribe to.
sole_traderlimited_companyResponse
200Returns a Stripe Checkout URL. Redirect the user to this URL to collect payment details.
Show response fields
checkoutUrlstringStripe Checkout session URL. Redirect the user here.
sessionIdstringStripe Checkout session ID for reference.
Error codes
400Invalid or unavailable plan specified.
404Organisation not found.