Create checkout session
POST
https://app.speybooks.com/api/v1/billing/checkoutCreate a Stripe Checkout session for subscribing to a plan. If the organisation has no Stripe customer, one is created automatically. Remaining trial days are applied as a trial period on the Stripe subscription.
Returns the Stripe checkout URL for client-side redirect and the session ID for tracking. Triggers a billing.checkout_started audit log entry.
Body parameters
plan string requiredPlan to subscribe to.
sole_traderlimited_companyResponse
200 Returns a Stripe Checkout URL. Redirect the user to this URL to collect payment details.
Show response fields
checkoutUrl stringStripe Checkout session URL. Redirect the user here.
sessionId stringStripe Checkout session ID for reference.
Error codes
400 Invalid or unavailable plan specified.
404 Organisation not found.