Billing

Record a completed plan checkout now (owners and admins)

Called when Stripe returns the browser from a completed Checkout, so the subscription is recorded at once instead of when Stripe's checkout.session.completed event arrives. The session is read from Stripe, never trusted from the caller: it must belong to the caller's workspace (another workspace's session is a 404) and be complete and paid (a trial's "no payment required" counts); otherwise confirmed is false and nothing changes. Idempotent with the webhook. Requires billing:manage.

post/billing/checkout:confirm

Request

  • Base URL: https://api.customdomain.ai/v1
  • URL: https://api.customdomain.ai/v1/billing/checkout:confirm
  • Auth: HTTP bearer

Request body

session_idstring required

Example request

{
  "session_id": "cs_test_a1B2c3"
}

Response

Whether the checkout was recorded, and the billing status after

confirmedboolean
session_statusstring
payment_statusstring

Example response

{
  "session_status": "complete",
  "payment_status": "paid"
}

Changes

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