Skip to main content

Start a checkout from inside your product

POST 

/v1/billing/checkout

Create a Stripe Checkout session for a plan owned by the calling plugin.

Validates that:

  • plan_id exists and belongs to ctx.plugin
  • any caller-supplied success_url / cancel_url points at a host listed in plugin.allowed_origins

Stamps plan_id and customer_id on the Stripe session metadata so the corresponding checkout.session.completed webhook can issue the license without a slug-lookup round-trip. A test key sells the plan's Stripe test price for its test environment (else the Default environment's), and the license lands in the key's environment.

Request​

Responses​

Successful Response