Create a Plan
Create a plan with basic details such as amount and currency
Request Parameters
interval, defines the frequency of the plan. Possible values:dailyweeklymonthlyquarterlyyearly
- For UPI, all undefined frequencies except
daily,weekly,monthly,quarterlyandyearlyare consideredas-presented. - For domestic cards, all undefined frequencies except
weekly,monthlyandyearlyare consideredas-presentedwhile registering the mandate with banks. - For Emandate, all defined and undefined frequencies are considered
as-presentedwhile registering the mandate with banks.
period, defines the frequency of the plan. If the billing cycle is 2 months, the value should be 2. For daily plans, the minimum value should be 7.Test Plan.69900 translates to ₹699.INR. You can accept payment in any of the supported currencies.Description for the test plan."note_key": "Monthly gym membership".Response Parameters
plan_00000000000001. This ID is used when creating a subscription for a customer.plan.period to define how often the customer should be charged.interval to define how often the customer should be charged. Possible values:dailyweeklymonthlyyearly
item_00000000000001.Test Plan.Description for the test plan."note_key": "Monthly Gym".Errors
Authentication failed
Authentication failed
401This error occurs when you use incorrect or invalid API Keys.Solution: Use the right set of API keys.`offer_id` is/are not required and should not be sent
`offer_id` is/are not required and should not be sent
400This error occurs when you are passing offer_id parameter in the request body.Solution: offer_id should not be passed in the request body.The amount must be at least INR 1.00.
The amount must be at least INR 1.00.
400The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100.Solution: Enter an amount equal to or greater than the minimum amount, that is 100.The period field is required.
The period field is required.
400The period field was not included in the request body.Solution: Pass period as one of the supported values (for example daily, weekly, monthly, yearly).Invalid argument for period passed.
Invalid argument for period passed.
400The value passed for period is not one of the supported values.Solution: Use one of the supported period values: daily, weekly, monthly, yearly.The interval field is required.
The interval field is required.
400The interval field was not included in the request body.Solution: Pass interval as a positive integer specifying how many period units between each billing cycle.The interval must be at least 1.
The interval must be at least 1.
400The interval value is 0 or negative.Solution: Pass interval as an integer greater than or equal to 1.The interval must be an integer.
The interval must be an integer.
400A non-integer value was passed for interval.Solution: Pass interval as an integer.The item id field is required when item is not present.
The item id field is required when item is not present.
400Neither the item object nor an item_id was included in the request body.Solution: Pass either an inline item object (with name, amount, currency) or an existing item_id.The name field is required.
The name field is required.
400The item.name field was not included in the inline item object.Solution: Always include item.name when passing an inline item.The amount field is required when unit amount is not present.
The amount field is required when unit amount is not present.
400Neither item.amount nor item.unit_amount was included in the request body.Solution: Pass item.amount (in currency subunits) or item.unit_amount.The amount must be valid integer between 0 and 4294967295.
The amount must be valid integer between 0 and 4294967295.
400A negative or out-of-range value was passed for item.amount.Solution: Pass item.amount as a non-negative integer below 4294967295.Currency provided is not supported.
Currency provided is not supported.
400The item.currency value is not one of the supported ISO currency codes.Solution: Use a supported 3-letter ISO currency code (for example, INR).{any extra field} is/are not required and should not be sent.
{any extra field} is/are not required and should not be sent.
400The request body contains fields that are not part of the Plans API schema.Solution: Only include documented fields in the request body.