Skip to main content

createPaymentMethodSetupSession

Create a Stripe Checkout session in SETUP mode to attach a payment method to the organization's EXISTING subscription. Returns the checkout session URL for redirect. No amount is charged and no plan changes.

This is how a card-free trial becomes a paying subscription: createSubscriptionSession refuses outright once the organization has a trialing subscription, so it cannot serve as the mid-trial card path.

Errors when the organization has no subscription in a status that could use a payment method. A card cannot resurrect a canceled subscription and there is nothing to attach one to on the Free plan — in both cases the path forward is createSubscriptionSession.

The step-up scope is manage-payment-method and NOT the manage-billing shared by the four mutations above. Step-up grants are keyed (userID, orgID, scope) with no field binding, so sharing manage-billing would make a grant minted to add a card also spend against createDepositSession, which moves real money.

createPaymentMethodSetupSession(
ownerID: String!
): String!

Arguments​

createPaymentMethodSetupSession.ownerID ● String! non-null scalar​

Type​

String scalar​

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.