Billing
replybots uses strict prepaid credits:
- 1 credit = 1 reply (whether static or AI-generated).
- No subscriptions, no free trials — accounts start with 0 credits and top up via Razorpay Orders.
- No charge on held or failed replies — if the risk gate withholds a draft or AI generation / delivery fails before sending, no credit is deducted.
- Purchased credits do not expire.
Payment Flow
- Order creation (
POST /api/billing/order) — creates a Razorpay Order for the requested credit count (betweenminCreditsandmaxCredits) in the tenant’s currency (INRorUSD). - Checkout & verification — the Elm dashboard opens Razorpay Checkout (
public/boot.js) and posts the payment signature to/api/billing/verify. - Authoritative webhook (
POST /webhook/razorpay,src/billing/webhook.rs) — verifiesX-Razorpay-Signature(HMAC-SHA256) and fails closed ifRAZORPAY_WEBHOOK_SECRETis unset or empty. Credits are recorded idempotently inpaymentsandtenant_billing.