Billing
Understand charge_usd, wallet balances, 402 errors, and how to add funds.
Every completed generative run appears on your wallet as a USD charge (charge_usd on the run). Failed runs are not charged.
Add funds and manage payment methods in the dashboard: app.nexdoc.design. Minimum top-up is $10.
Wallet summary
curl -sS "$NXD_API_URL/v1/credits" \
-H "Authorization: Bearer $NXD_API_KEY" | jq{
"free_balance_usd": 5.0,
"paid_balance_usd": 20.0,
"balance_usd": 25.0,
"past_due": false,
"has_payment_method": true
}| Field | Meaning |
|---|---|
balance_usd | Total spendable (free + paid) |
free_balance_usd | Promotional / grant balance |
paid_balance_usd | Purchased balance |
past_due | Account blocked until topped up |
Run charges
curl -sS "$NXD_API_URL/v1/jobs/$JOB/runs/$RUN_ID" \
-H "Authorization: Bearer $NXD_API_KEY" | jq '{status, charge_usd}'Ledger:
curl -sS "$NXD_API_URL/v1/credits/ledger" \
-H "Authorization: Bearer $NXD_API_KEY" | jqStarting a run — 402
If the wallet cannot cover a run (or past_due is true), POST …/runs returns 402:
{ "detail": "insufficient credits" }or
{ "detail": "account past due — add credits to continue" }Send the user to app.nexdoc.design. Do not retry in a loop.
Optional: POST /v1/credits/checkout with { "amount_usd": 20 } returns a Stripe Checkout URL (whole dollars, minimum $10) if they asked for a programmatic top-up. GET /v1/billing/portal returns the Stripe customer portal URL.