Subscriptions

Start subscription checkout

Create a Stripe Checkout session for upgrading a user to a paid plan.

post/subscriptions/create-checkout

Request

  • Base URL: https://us-central1-paymentgateway-ab783.cloudfunctions.net/api
  • URL: https://us-central1-paymentgateway-ab783.cloudfunctions.net/api/subscriptions/create-checkout
  • Auth: HTTP bearer

Request body

appIdstring required

Application identifier the subscription applies to.

planIdstring required

Plan tier key (free, starter, professional, business, enterprise).

priceIdstring

Stripe price ID. Optional — resolved from appId + planId + interval if omitted.

interval'monthly' | 'yearly'

Billing interval. Used when priceId is omitted. Defaults to monthly.

successUrlstring uri
cancelUrlstring uri
metadataobject

Example request

{
  "appId": "react-blog",
  "planId": "professional",
  "priceId": "price_1Q9xyZA10"
}

Response

Checkout session created

successboolean
sessionIdstring
urlstring uri

Changes

No recorded changes to this operation across all 1 revision of this API.