Skip to content
nexdoc.design Docs

Credits API

Look up wallet balance, ledger entries, Stripe checkout, and the billing portal for NexDoc Design usage credits.

All amounts are USD. Manage payment methods and invoices in the dashboard.

GET/v1/credits

balance_usd, free_balance_usd, paid_balance_usd, past_due, auto_topup_enabled, threshold_usd, topup_usd, monthly_max_usd, has_payment_method.

On 402, surface balance_usd and send the user to app.nexdoc.design (minimum top-up $10). Do not start checkout on someone else’s behalf unless they ask.

GET/v1/credits/ledger

code
{
  "data": [
    {
      "entry_id": "...",
      "kind": "run_charge",
      "amount_usd": -0.16,
      "run_id": "run_...",
      "note": null,
      "created_at": "..."
    }
  ]
}

POST/v1/credits/checkout

code
{ "amount_usd": 20 }

Whole dollars, minimum $10. Returns a Stripe Checkout URL. Prefer sending people to the dashboard unless they asked for a checkout link.

GET/v1/billing/portal

code
{ "url": "https://billing.stripe.com/..." }