Skip to content

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

ArgumentInTypeRequiredDescription
amount_paisebodyintegeroptionalCredit 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.
packbodystringoptionalA top-up pack code from GET /billing/balance (`packs`). Fixes the amount and may grant bonus credits; top-up credits never expire.
promo_codebodystringoptionalA 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

StatusWhen
404Not found
422Validation Error