Skip to main content

createSubscription

Starts an in-app Stripe subscription for the plan, or resumes or adjusts the existing one instead of creating a second subscription. Contacts Stripe and can create the customer, set paymentMethodId as its default card, or collect an outstanding invoice. New subscriptions have no trial and are charged immediately; confirm a returned clientSecret to finish payment. Use createCustomCheckoutSession for hosted checkout. Requires billing change plan access.

createSubscription(
planPriceId: String!
paymentMethodId: String
promotekitReferral: String
): CreateSubscriptionResult

Arguments​

createSubscription.planPriceId ● String! non-null scalar​

Stripe price ID from pricingGrid or a tier stripeId from tieredPricingPlans; not the numeric payment plan ID.

createSubscription.paymentMethodId ● String scalar​

Stripe payment method ID from the client-side card form. Omit to reuse the customer's default card; required when the account has no Stripe customer yet.

createSubscription.promotekitReferral ● String scalar​

Optional referral string; currently ignored by this operation.

Type​

CreateSubscriptionResult object​

Subscription payment status returned by createSubscription, with a client secret when payment confirmation is needed.