post https://staging.myrecurpay.com/api/admin/v2/plans
Create a plan on the Recurpay dashboard
Request Params
Plan Object
Attribute | Type | Description |
---|---|---|
name | string | Plan Name - A customer facing name of the plan. |
description | string | Plan Description - A customer facing description of the plan. |
type | enum | Plan Type. The value is: regular - Recurring payment would be received. prepaid - Upfront payment would be received. |
status | enum | Status of the plan. Active - Plan will be active and visible on storefront. Inactive - Plans will be inactive and not visible on storefront. |
products | array of object | Products belonging to this plan. |
delivery_policy | object | Plan policy which describes the delivery details. See Delivery Policy |
pricing_policy | object | Plan policy which describes the discounts and pricing details. See Pricing Policy |
billing_policy | object | Plan policy which describes the recurring billing details. See Billing Policy |
shipping_policy | object | Plan policy which describes the shipping details. See Shipping Policy |
trial_policy | object | Plan policy which describes the trial details. See Trial Policy |
manual_payment_gateway | object | Status and details of manual payment gateway activation on the plan. See Manual Payment Gateway |
visibility | enum | Plan visibility on storefront. Visible - Will be visible to the end user. Hidden - Will be hidden to the end user. Visibility is irrespective of the status of the plan. |
Product Object
Attribute | Type | Description |
---|---|---|
id | integer | Product Id |
plans | object | Object containing the plan details. See Plan Object |
Pricing Policy
Attribute | Type | Description |
---|---|---|
discount | object | Discount applicable on plan. Note: The discount will be applicable on top of the product price and other discounts. See Discount Object |
Discount Object
Attribute | Type | Description |
---|---|---|
type | enum | The type can be of: percentage: Type of discount applicable on plan |
value | float | The discount you want to offer on this plan. The discount will be calculated on top of product price and other discounts. |
Delivery Policy
Attribute | Type | Description |
---|---|---|
frequency | integer | The delivery frequency. |
interval | enum | The delivery interval, it can be either: day, week, month or year. |
Billing Policy
Attribute | Type | Description |
---|---|---|
frequency | integer | The billing frequency. |
interval | enum | The billing interval, it can be either: day, week, month or year. |
auto_expire | object | Defines billing expiry of the subscription charges. See Auto Expiry Object |
Auto Expiry Object
Attribute | Type | Description |
---|---|---|
status | boolean | Status of auto expiry. Value : true, false |
frequency | integer | The expiry frequency. |
interval | enum | The expiry interval, it can be either: day, week, month or year. |
Shipping Policy
Attribute | Type | Description |
---|---|---|
status | boolean | Status of plan shipping, it can be either true or false. |
type | enum | Type of Shipping, it can be either free_shipping - Free shipping for this plan charge_on_first_order - Charge shipping rate only on the first order for subscription. charge_on_every_order - Charge shipping on every order created for subscription |
price | float | Shipping price of the plan |
Trial Policy
Attribute | Type | Description |
---|---|---|
status | boolean | The status whether the trial is applicable or not. |
frequency | integer | The trial frequency |
interval | enum | The trial interval, it can be either: day, week, month or year. |
description | string | Description of the trial plan |
products | array | Array of Variant Id's which needs to be given for trial. |
Manual Payment Gateway
Attribute | Type | Description |
---|---|---|
status | boolean | The status whether the manual payment gateway needs to be shown on checkout for this specific plan. It can be either true or false. |
name | string | Name of the manual payment gateway. |