Skip to content

Create checkout session

POST
/api/checkout

Create a Stripe checkout session to subscribe to a plan or change your current plan. The response includes a URL that redirects the user to the Stripe-hosted checkout page.

object
tier
required

Plan to subscribe to: free, starter, growth, scale, enterprise.

string
Example
growth
cadence
required

Billing frequency: monthly or annual.

string
Example
annual
successUrl
required

URL to redirect to after a successful checkout.

string
Example
https://app.ohallo.eu/settings/billing?checkout=success
cancelUrl
required

URL to redirect to if the user cancels checkout.

string
Example
https://app.ohallo.eu/settings/billing?checkout=canceled

The checkout session was created.

A Stripe checkout session URL for subscribing to or changing a plan.

object
checkoutUrl
required

URL that redirects the user to the Stripe-hosted checkout page.

string
Example
https://checkout.stripe.com/c/pay/cs_live_a1b2c3d4e5f6g7h8i9j0...