Skip to main content

completeCompanySignup

Finishes customer self-signup after the user returns from Stripe Checkout.

Saves the collected card as the customer's default payment method, creates the company, grants the caller admin access to it, and starts a 7-day trial subscription on the plan chosen at checkout. The provider subscription is created at the same time and projected onto the company's billing row immediately.

Returns status: PENDING with no company when the checkout has not settled yet. That is not a failure — retry shortly. Terminal problems are raised as errors, so clients must branch on status rather than on company being null.

Business Rules​

  • Only the user who started the signup may complete it
  • Idempotent: calling it again for the same session returns the same company
  • The checkout.session.completed webhook runs the same work, so a user who closes the tab still gets their company

Error Scenarios​

  • No signup request found when the id is unknown
  • This signup belongs to another user when the caller did not start it

Permissions Required​

  • Any authenticated user, limited to their own signup
completeCompanySignup(
input: CompleteCompanySignupInput!
): CompleteCompanySignupPayload

Arguments​

completeCompanySignup.input ● CompleteCompanySignupInput! non-null input common​

Parameters for CompleteCompanySignup

Type​

CompleteCompanySignupPayload object common​

Autogenerated return type of CompleteCompanySignup.