Billing
Start a subscription
Get a Cashfree checkout link for a plan.
Open the returned link in a browser. The customer approves a card or UPI mandate there, and the first period is charged straight away.
Authentication
A signed-in session: the cookie from Log in. Changes also need the X-CSRF-Token header.
Body
planstringrequiredpro, developer or business.
intervalstringoptionalmonth (default) or year.
Response
200 OK
checkout_urlstringWhere to send the customer.
Errors
| Status | Code | What to do |
|---|---|---|
| 409 | billing_profile_required | Save your billing details first. |
| 409 | already_subscribed | Change or cancel the current subscription first. |
| 409 | price_not_available | This plan isn't on sale for that billing period. |
| 409 | provider_rejected | Cashfree refused the request. See message. |
| 503 | billing_unavailable | Online payments aren't switched on. |
| 401 | unauthenticated | Log in first, or log in again. |
| 403 | csrf_failed | Send the csrf_token as X-CSRF-Token. |