API Reference
Payments & Invoices
Top up credits or upgrade your plan via Cashfree, download GST invoices, redeem coupons, and set a monthly credit budget cap.
Overview
Payments are processed through Cashfree. Use create-order to start a plan upgrade or a credit top-up, then complete checkout with the Cashfree SDK using the returned payment_session_id. The signed Cashfree webhook is the source of truth for settlement — never grant credits on the client-side redirect alone. Successful orders generate a downloadable GST invoice. 1 credit = ₹1.
cm_ API key. Creating orders, upgrading plans, and managing billing are owner/admin actions and are not exposed to API keys.Payments
Start a credit top-up of 5,000 credits (₹5,000):
curl https://api.callmissed.com/api/v1/payments/create-order \
-H "Authorization: Bearer <jwt_access_token>" \
-H "Content-Type: application/json" \
-d '{"type": "credit_topup", "credits": 5000}'{
"order_id": "cm_9f2a1c4e6b8d0a13",
"cf_order_id": "CF...",
"payment_session_id": "session_...",
"amount": 5000.0,
"currency": "INR",
"env": "production"
}For a plan upgrade send {"type": "plan_upgrade", "plan": "pro"} instead. Pass payment_session_id to the Cashfree checkout SDK; assert the SDK mode matches the returned env.
/api/v1/payments/create-order AuthCreate a Cashfree order for a plan upgrade or credit top-up
Request Body
typeplan_upgrade | credit_topupplanstarter | pro | enterprise (for plan_upgrade)creditsinteger 0-100000 (for credit_topup)/api/v1/payments/verify AuthVerify a payment client-side after checkout
Request Body
order_idstring/api/v1/payments/retry AuthRetry a failed payment
Request Body
order_idstring/api/v1/payments/history AuthList payment history
Query Parameters
limitnumber (1-100)/api/v1/payments/webhookCashfree settlement webhook (signature-verified, server-to-server)
/api/v1/invoices AuthList invoices
/api/v1/invoices/:invoice_number AuthGet invoice detail
/api/v1/invoices/:invoice_number/pdf AuthDownload the invoice PDF
/api/v1/coupons/redeem AuthRedeem a coupon code for credits
Request Body
codestring/api/v1/credits/budget AuthGet the monthly credit budget cap and current usage
/api/v1/credits/budget AuthSet or clear a monthly budget cap (requests over the cap are rejected)
Request Body
monthly_limitnumber (credits, null to clear)