POST /v1/billing/confirm-from-token
Tags: billing
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string,null |
Request body
Required.
JSON
{
"$ref": "#/components/schemas/ConfirmFromTokenRequest"
}Responses
200 — PI server-confirmed; status echoes Stripe (succeeded / requires_action / processing). When requires_action, the FE drives stripe.handleNextAction with client_secret.
JSON
{
"$ref": "#/components/schemas/ConfirmFromTokenResponse"
}400 — INVALID_REQUEST — amount below $1.00 floor or malformed token
401 — CONFIRMATION_REQUIRED — sudo grant missing/expired
402 — BILLING_NOT_CONFIGURED — Stripe not configured or org dunning posture forbids top-up
Code samples
TypeScript
TypeScript
import { firecase } from "@firecase/sdk";
const result = await firecase.post("/billing/confirm-from-token", { /* body */ });
console.log(result);Python
Python
import firecase
result = firecase.post("/billing/confirm-from-token", json={})
print(result)curl
Bash
curl -X POST https://api.firecase.ai/v1/billing/confirm-from-token \
-H "Authorization: Bearer $FIRECASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'