createCompanySignupCheckoutSession
Starts customer self-signup for a new company.
Reserves the requested company name and handle, creates a provider customer, and
mints a setup-mode Stripe Checkout URL that saves a card without charging it.
Nothing else is created yet: the company, its subscription and the caller's admin
access are all created by completeCompanySignup once the session completes, so an
abandoned checkout leaves no company behind.
Business Rules
- The plan must have a price and a linked provider product; quote-only plans such
as
enterpriseare rejected - The handle and company name must be free, checked against existing companies and against other users' signups currently mid-checkout
- A caller gets one signup in flight: calling again updates their own pending signup, so an abandoned checkout can be resumed with the same handle
- An earlier checkout that is still open is resumed rather than replaced, so a caller who changes their mind about what to buy keeps the same session — the selection lives on the signup row, not in the session
productsis everything the signup subscribes to, the plan included. Exactly one entry must be a plan, at quantity 1; the rest are a la carte add-ons. Each entry becomes its own line on the subscription, and the whole list is replaced on every call, so an entry left out is dropped- If the earlier checkout already completed, the returned URL is the completion page instead, since the card has been collected and must not be asked for twice
- No company scope is required — the caller has no company yet
Error Scenarios
'<name>' is not available for self-signupwhen the product is unknown, or has no price or provider product yet — quote-only plans such asenterpriseincludedPick a plan to sign up forwhen no entry is a planPick one plan: <a> and <b> are both planswhen more than one entry isPlan '<name>' quantity must be 1'<name>' quantity must be at least 1'<name>' was selected more than onceThat handle is already takenwhen the handle belongs to a company or to another user's pending signupA company with that name already exists— checked here because registration enforces it too, and there it would fail after the card was collectedHandle must start with a letter...when the handle is malformed
Permissions Required
- Any authenticated user
createCompanySignupCheckoutSession(
input: CreateCompanySignupCheckoutSessionInput!
): CreateCompanySignupCheckoutSessionPayload
Arguments
createCompanySignupCheckoutSession.input ● CreateCompanySignupCheckoutSessionInput! non-null input common
Parameters for CreateCompanySignupCheckoutSession
Type
CreateCompanySignupCheckoutSessionPayload object common
Autogenerated return type of CreateCompanySignupCheckoutSession.