POST /v1/billing/customer-sessions

Tags: billing

Responses

200 — Pass client_secret to <Elements options={{ customerSessionClientSecret }}> to render the saved-PM picker

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

402 — BILLING_NOT_CONFIGURED

Code samples

TypeScript

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

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

Python

Python
import firecase

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

curl

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