billing.topup
Buy credit.
Reference
POST/api/v1/billing/topup
- Auth
- API key in
X-API-Key - Content
- application/json
- Returns
- 200 · Response Create Topup Api V1 Billing Topup Post
Open a Razorpay order for this account. Refuses when no webhook secret is set. The order would otherwise succeed, the customer would pay, and nothing would ever credit them — a failure that is invisible until someone complains.
Arguments
| Argument | In | Type | Required | Description |
|---|---|---|---|---|
amount_paise | body | integer | optional | Credit to buy, in paise, net of GST. ₹500 is 50000. Bought in steps of TOPUP_INCREMENT_PAISE. Tax is added on top of this at checkout. Omit when buying a pack. |
pack | body | string | optional | A top-up pack code from GET /billing/balance (`packs`). Fixes the amount and may grant bonus credits; top-up credits never expire. |
promo_code | body | string | optional | A promo code (KAN-134). Checked before the order is made. |
Example request
curl -X POST "https://api.decibyl.ai/api/v1/billing/topup" \
-H "X-API-Key: dcb_your_key" \
-H "Content-Type: application/json" \
-d '{"amount_paise":1,"pack":"string","promo_code":"string"}'Response
{}Errors
| Status | When |
|---|---|
404 | Not found |
422 | Validation Error |