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_idexists and belongs toctx.plugin- any caller-supplied
success_url/cancel_urlpoints at a host listed inplugin.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
- 200
- 400
- 401
- 403
- 404
- 409
- 422
Successful Response
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Validation Error