Start a credit checkout
Opens a Stripe Checkout session for one credit pack and returns its URL.
This is what to do about insufficient_credits. It buys nothing by itself: the URL is a payment page a human opens, and the balance moves only when Stripe confirms the payment, which arrives as an ordinary purchase row in listCreditTransactions. So the workflow is to create the checkout, hand the URL to the person the agent is working for, and stop. Do not poll getCreditBalance in a loop waiting for a card to be typed.
billing:manage is required on top of account:read, and only a workspace owner can grant it, so a credential that can reach this endpoint was minted by the one person entitled to spend the workspace's money.
successUrl and cancelUrl are where Stripe returns the payer afterwards. Both must be absolute https URLs with no embedded credentials; anything else answers 400 validation_error. Omit them to use the dashboard credits page.
Request
- Base URL: https://inkseal.net/api/v1
- URL: https://inkseal.net/api/v1/credits/checkout
- Auth: HTTP bearer
Headers
Makes this mutation retry-safe. 1 to 255 printable ASCII characters (0x20 to 0x7e), trimmed before use. The key is scoped to the workspace and the credential that sent it. Reusing it with a different method, path, or payload answers 422 idempotency_key_reuse. A completed attempt replays its stored status and body with an Idempotent-Replay: true response header; 5xx, 429, and non-JSON answers leave the key retryable. A concurrent request holding the 90 second lease answers 409 idempotency_in_progress. Records are retained 24 hours.
Request body
Example request
{
"packId": "pack_25",
"successUrl": "https://app.example.com/billing/thanks",
"cancelUrl": "https://app.example.com/billing"
}Response
The checkout session. No credits have been added yet.
Example response
{
"data": {
"checkoutUrl": "https://checkout.stripe.com/c/pay/cs_test_a1b2c3",
"expiresAt": "2026-08-22T09:14:02.000Z",
"packId": "pack_25",
"credits": 25,
"amountCents": 3900,
"currency": "usd"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.