Skip to main content
The plans endpoints let you create billing plans in Razorpay, list existing plans, and fetch a single plan by id. Plans define the billing interval and are linked to items that describe what is being charged.

Create plan

POST /api/auth/razorpay/plan/create Creates a new Razorpay plan. A plan requires a billing period, interval, and an item with a name and amount. Server API name: createPlan
Client method: authClient.razorpay.plan.create(...)
string
required
Billing period. One of daily, weekly, monthly, quarterly, or yearly.
integer
required
Interval between billing cycles. Must be a positive integer.
string
required
Name of the item being billed.
integer
required
Amount in the smallest currency subunit. For INR, 50000 equals ₹500.
string
default:"INR"
ISO 4217 currency code. Three characters.
string
Optional description of the item.
object
Up to 15 key-value pairs. Each value must be 256 characters or fewer.
string
Razorpay plan id, for example plan_XXXX.
string
Billing period.
integer
Billing interval.
object
The item object with id, name, amount, currency, and description.
Errors: PLAN_CREATE_FAILED.

List plans

GET /api/auth/razorpay/plan/list Lists Razorpay plans with pagination. Server API name: listPlans
Client method: authClient.razorpay.plan.list({ query: { ... } })
integer
Unix timestamp. Return plans created after this time.
integer
Unix timestamp. Return plans created before this time.
integer
Maximum number of plans to return. Maximum value is 100.
integer
Number of plans to skip.
array
Array of plan objects.
integer
Total number of plans returned in this response.

Get plan

GET /api/auth/razorpay/plan/get Retrieves a single Razorpay plan by id. Server API name: fetchPlan
Client method: authClient.razorpay.plan.get({ query: { planId } })
string
required
Razorpay plan id.
string
Razorpay plan id.
string
Billing period.
integer
Billing interval.
object
The item object.
Errors: PLAN_NOT_FOUND.