POST /v1/billing/setup-intents

Tags: billing

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstring,null

Responses

200 — Hand client_secret to the FE PaymentElement to capture a card in-app

JSON
{
  "$ref": "#/components/schemas/SetupIntentResponse"
}

402 — BILLING_NOT_CONFIGURED

Code samples

TypeScript

TypeScript
import { firecase } from "@firecase/sdk";

const result = await firecase.post("/billing/setup-intents", { /* body */ });
console.log(result);

Python

Python
import firecase

result = firecase.post("/billing/setup-intents", json={})
print(result)

curl

Bash
curl -X POST https://api.firecase.ai/v1/billing/setup-intents \
  -H "Authorization: Bearer $FIRECASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'