Plans🔗
A plan is a foundation on which a subscription is built. It acts as a reusable template and contains details of the goods or services offered, the amount to be charged and the frequency at which the customer should be charged (billing cycle). Depending upon your business, you can create multiple plans with different billing cycles and pricing.
You must create a plan before creating a subscription via the Checkout or using the Subscription Link feature.
Create a Plan🔗
Use the below endpoint to create a plan.
Request Parameters🔗
periodmandatory-
string. Used together withintervalto define how often the customer should be charged. For example, if you want to create a monthly subscription, pass periodmonthlyand interval1. Possible values:dailyweeklymonthlyyearly
intervalmandatory-
integer. Used together withperiodto define how often the customer should be charged. For example, if you want to create a monthly subscription, pass periodmonthlyand interval1.
For daily plans, the minimum interval is 7. item-
Details of the plan.
namemandatorystring. Name of the plan. For example,Test Plan.amountmandatoryinteger. Amount for the plan that is to be charged to the subscription in the next billing cycle. For example,69900translates to ₹699.currencymandatorystring. Currency for the payment. For example,INR. You can accept payment in any of the supported currencies.descriptionoptionalstring. Description for the plan. For example,Description for the test plan.
notesoptional-
object. Notes you can enter for 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": "Beam me up Scotty”.
Response Parameters🔗
id-
string. The unique identifier linked to a plan. For example,plan_00000000000001. This ID is used when creating a subscription for a customer. entity-
string. The entity being created. Here, it isplan. interval-
integer. Used together withperiodto define how often the customer should be charged. period-
string. Used together withintervalto define how often the customer should be charged. Possible values:dailyweeklymonthlyyearly
item-
Details of the plan.
idstring. The unique identifier linked to an item. For example,item_00000000000001.namestring. Name of the plan. For example,Test Plan.amountinteger. Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically.currencystring. Currency for the payment. Defaults toINR. You can accept payment in any of the supported currencies.descriptionstring. Description for the plan. For example,Description for the test plan.
notes-
object. Notes you can enter for 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": "Beam me up Scotty”. created_at-
integer. The Unix timestamp at which the plan was created.
Fetch all Plans🔗
Use the below endpoint to fetch details of all plans.
Query Parameters🔗
frominteger. The Unix timestamp from when plans are to be fetched.tointeger. The Unix timestamp till when plans are to be fetched.countinteger. The number of plans to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination in combination withskip.skipinteger. The number of plans to be skipped. Default value is 0. This can be used for pagination in combination withcount.
Fetch a Plan by ID🔗
Use the below endpoint to fetch details of a plan by its unique identifier.
Path Parameter🔗
idmandatorystring. The unique identifier of the plan. For example,plan_00000000000001.