FEATURES
Checkout
Stripe Checkout sessions linking payment to pending checkout records.
Overview
Stripe Checkout sessions linking payment to pending checkout records.
Who should use this
Public pricing visitors and authenticated org admins upgrading plans.
Core concepts
PendingCheckout status flow: pending → (Stripe paid) paid_pending_account (anonymous) or tenant subscription (authenticated) → claimed after email-verified signup.
Setup
POST /checkout/sessions { planKey, email? } → { checkout, checkoutUrl, stripeSessionId } → Stripe → /checkout/success → org signup/login → GET /checkout/pending?email= → claim on post-confirmation or POST .../claim.
Required entitlement
checkout / subscription.manage.
Required permissions
Anonymous POST /checkout/sessions; claim requires authenticated verified email match.
REST API
POST /checkout/sessions, GET /checkout/pending, POST /checkout/sessions/{checkoutId}/claim.
SDK (@startupcore/api-client)
startupCore.checkout.create(body), .pending(email), .claim(checkoutId, { claimToken }).
React components
<CheckoutButton planKey="starter" email={...} /> on public-site pricing.
Security notes
Claim requires verified email matching checkout email; idempotent Stripe webhooks.
Troubleshooting
CHECKOUT_EXPIRED — start a new session. CHECKOUT_ALREADY_CLAIMED — payment already linked.