DocsCredits API
Billing

Credits API

GET /v1/credits
curl https://poldex-api.plain-water-cd0f.workers.dev/v1/credits \
  -H "x-api-key: pd_live_YOUR_KEY"

Checkout

POST /v1/billing/checkout
curl -X POST https://poldex-api.plain-water-cd0f.workers.dev/v1/billing/checkout \
  -H "x-api-key: pd_live_YOUR_KEY" \
  -H "Idempotency-Key: credit_001" \
  -H "Content-Type: application/json" \
  -d '{"credits":1000,"redirect_url":"https://your.app/credits"}'

History

Use GET /v1/credits/history for paginated ledger events.