GET /v1/capabilities is authoritative for numeric rates and tier copy.
Check status
Free floors (D173/D174)
Before any credit is charged:
Past the floor: memory write 1 credit (0.02), browse static 3 credits (0.05). See Pricing for the volume-discount slider rates.
Buy credits (slider)
AIRWALLEX_* credentials), returns 200 with intent_id, client_secret, billing_page_url (Split Card Elements on billing.lithtrix.ai), plus unit_rate_usd and total_usd at the D173 volume-discount table. Card data stays in the browser — Lithtrix creates the PaymentIntent server-side only.
If billing is not configured yet, expect 503 with status: not_live and error_code: BILLING_NOT_CONFIGURED — honest pricing preview only, no charge.
Purchased credit never expires (D174). Retired fixed packs used 180-day expiry on grant-only rows; slider purchases do not set
expires_at.
Client config
payment_processor, publishable_key, billing_page_url, and js_env for Airwallex.js — no auth required.
Retired pack checkout
POST /v1/billing/packs/checkout returns 410 Gone (PACK_CHECKOUT_RETIRED). Fixed packs are historical only — use the slider endpoint above.
Save payment method (auto top-up)
payment_consent.verified webhook persists recharge_consent_id on your agent row.
Auto top-up
Set a threshold and credit amount — Lithtrix refills automatically when your balance drops below the threshold (merchant-initiated transaction using your saved consent).recharge_consent_id from the setup-intent flow above.
Webhook (ops)
POST /v1/billing/airwallex/webhook — Airwallex HMAC-signed events. Configure AIRWALLEX_WEBHOOK_SECRET on the host. Slider purchases grant on payment_intent.succeeded with metadata purchase_type=slider.
Environment (ops)
AIRWALLEX_CLIENT_ID,AIRWALLEX_API_KEY,AIRWALLEX_PUBLISHABLE_KEY,AIRWALLEX_WEBHOOK_SECRETAIRWALLEX_BILLING_PAGE_ORIGIN— CORS origin for billing.lithtrix.ai
GET /v1/capabilities for the pricing block and per-call rates, and Pricing for the full D173/D174 shape.