Subscriptions
Fetch All Plans
Fetch details of all plans created using the Razorpay API.
GET
Use this endpoint to fetch details of all plans.
Query Parameters
integer
The Unix timestamp from when plans are to be fetched.
integer
The Unix timestamp till when plans are to be fetched.
integer
The number of plans to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination in combination with
skip.integer
The number of plans to be skipped. Default value is 0. This can be used for pagination in combination with
count.Response Parameters
string
The unique identifier linked to a plan. For example,
plan_00000000000001. This ID is used when creating a subscription for a customer.string
The entity being created. Here, it is
plan.integer
Used together with
period to define how often the customer should be charged.string
Used together with
interval to define how often the customer should be charged. Possible values:dailyweeklymonthlyyearly
array
Details of the plan.
string
The unique identifier linked to an item. For example,
item_00000000000001.string
Name of the plan. For example,
Test Plan.integer
Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically.
string
Currency for the payment. You can accept payment in any of the supported currencies.
string
Description for the plan. For example,
Description for the test plan.object
Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example,
"note_key": "Monthly Gym".integer
The Unix timestamp at which the plan was created.
Errors
The API key/secret provided is invalid.
The API key/secret provided is invalid.
Code:
4xxThis error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard.Solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys.count must be an integer between 1 and 100.
count must be an integer between 1 and 100.
Code:
400An invalid value was passed for the count query parameter. The API returns The count must be at least 1. (for count=0 or negative), The count may not be greater than 100. (for values above 100), or The count must be an integer. (for non-integer values).Solution: Pass count as a positive integer between 1 and 100.skip must be a non-negative integer.
skip must be a non-negative integer.
Code:
400A negative value was passed for the skip query parameter.Solution: Pass skip as a non-negative integer (0 or higher).from and to must be UNIX-epoch integers.
from and to must be UNIX-epoch integers.
Code:
400A non-integer value (for example a human-readable date like 2024-01-01) was passed for from or to. The API returns from must be an integer. or to must be an integer. respectively.Solution: Pass from and to as UNIX-epoch integers in seconds.from and to must be between 946684800 and 5080579200.
from and to must be between 946684800 and 5080579200.
Code:
400The from or to value is outside the accepted UNIX-timestamp range (corresponds to roughly 2000-01-01 to 2131-01-01). The API returns from must be between 946684800 and 5080579200 or to must be between 946684800 and 5080579200 respectively. The bounds are inclusive.Solution: Pass from and to as UNIX-epoch integers between 946684800 and 5080579200 (inclusive).