POST /v1/billing/topup
Tags: billing
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string,null |
Request body
Required.
JSON
{
"$ref": "#/components/schemas/TopupRequest"
}Responses
200 — Stripe Checkout URL for top-up
JSON
{
"$ref": "#/components/schemas/CheckoutResponse"
}400 — INVALID_REQUEST — amount below minimum
401 — CONFIRMATION_REQUIRED — sudo grant missing/expired
402 — BILLING_NOT_CONFIGURED
Code samples
TypeScript
TypeScript
import { firecase } from "@firecase/sdk";
const result = await firecase.post("/billing/topup", { /* body */ });
console.log(result);Python
Python
import firecase
result = firecase.post("/billing/topup", json={})
print(result)curl
Bash
curl -X POST https://api.firecase.ai/v1/billing/topup \
-H "Authorization: Bearer $FIRECASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'