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🔗
period
mandatory-
string
. Used together withinterval
to define how often the customer should be charged. For example, if you want to create a monthly subscription, pass periodmonthly
and interval1
. Possible values:daily
weekly
monthly
yearly
interval
mandatory-
integer
. Used together withperiod
to define how often the customer should be charged. For example, if you want to create a monthly subscription, pass periodmonthly
and interval1
.
For daily plans, the minimum interval is 7. item
-
Details of the plan.
name
mandatorystring
. Name of the plan. For example,Test Plan
.amount
mandatoryinteger
. Amount for the plan that is to be charged to the subscription in the next billing cycle. For example,69900
translates to ₹699.currency
mandatorystring
. Currency for the payment. For example,INR
. You can accept payment in any of the supported currencies.description
optionalstring
. Description for the plan. For example,Description for the test plan
.
notes
optional-
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 withperiod
to define how often the customer should be charged. period
-
string
. Used together withinterval
to define how often the customer should be charged. Possible values:daily
weekly
monthly
yearly
item
-
Details of the plan.
id
string
. The unique identifier linked to an item. For example,item_00000000000001
.name
string
. Name of the plan. For example,Test Plan
.amount
integer
. Amount for the plan. When you use this plan to create a subscription, the customer will be charged this amount periodically.currency
string
. Currency for the payment. Defaults toINR
. You can accept payment in any of the supported currencies.description
string
. 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🔗
from
integer
. The Unix timestamp from when plans are to be fetched.to
integer
. The Unix timestamp till when plans are to be fetched.count
integer
. The number of plans to be fetched. Default value is 10. Maximum value is 100. This can be used for pagination in combination withskip
.skip
integer
. 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🔗
id
mandatorystring
. The unique identifier of the plan. For example,plan_00000000000001
.