Represents how a product can be sold and purchased.
🔒 Requires read-plans or write-plans access scope.
{} The plan's object
{
"id": 503,
"selling_plan_group_id": "gid://shopify/SellingPlanGroup/78665548050",
"name": "Monthly Subscription new",
"description": "Your will receive an order in every 1 Month",
"selling_plans": [{
"id": 503,
"selling_plan_id": "gid://shopify/SellingPlan/691528040722",
"delivery_policy": {
"frequency": 1,
"interval": "month",
"auto_expire": {
"frequency": 12,
"interval": "month"
},
"anchors": {
"type": "MONTHDAY",
"value": [10, 20]
},
"pre_anchor_behavior": "ASAP",
"cutoff": 0
},
"billing_policy": {
"frequency": 1,
"interval": "month"
},
"pricing_polices": [{
"discount": {
"type": "percentage",
"value": 50
}
}]
}],
"shipping_policy": {
"type": "ecommerce_calculated_rates",
"price": null
},
"products": [
{
"id": 9028505829650,
"excluded_variants": [
{
"id": 45703992606994
},
{
"id": 47305781674258
}
]
}
],
"product_count": 1,
"status": "active",
"created_at": "2024-03-21 16:54:59",
"updated_at": "2024-05-17 22:36:11"
}The Plan Resource
Attribute | Type | Description |
|---|---|---|
id | integer | An unsigned 64-bit integer that's used as a unique identifier for the plan. Each id is unique across the Recurpay system. No two plans will have the same id, even if they're from different stores. |
selling_plan_group_id | string | Represents a unique identifier of a Shopify selling plan group, this can be null in case of any other platform than Shopify. |
name | string | The buyer-facing label of the plan. |
description | string | A description of the plan. Supports HTML formatting. |
selling_plans | array | An array of selling plans, each representing a different version of the plan such as monthly plan, and yearly plan. view |
shipping_policy | object | The shipping policy defines the delivery method for the specific purchase, which can be Recurpay flat rates or E-commerce calculated rates. view |
products | array | An array of product objects for which the plan is fetched. Each product object includes the product ID and an optional list of excluded variant IDs. Variants listed under excluded_variants will not be included in the plan. |
product_count | integer | A count of products associated with the plan. |
status | enum | The status of the plan. |
created_at | string | The autogenerated date and time (ISO 8601 format) when the plan was created in Recurpay. |
updated_at | string | The date and time (ISO 8601 format) when the plan was last modified. |
Products
Attribute | Type | Description |
|---|---|---|
id | integer | A globally-unique ID of the product |
excluded_variants | array | An array of variant IDs that should be excluded from the plan for this product. |
Excluded Variants
| Attribute | Type | Description |
|---|---|---|
| id | integer | A globally-unique ID of the variant |
Selling Plans
| Attribute | Type | Description |
|---|---|---|
| id | integerreadonly | An unsigned 64-bit integer that's used as a unique identifier for the selling plan. Each id is unique across the Recurpay system. No two selling plans will have the same id, even if they're from different plans. |
| selling_plan_id | stringreadonly | Represents a unique identifier of a Shopify selling plan, this can be null in case of any other platform than Shopify. |
| delivery_policy | object | A selling plan policy which describes the delivery details. view |
| billing_policy | object | A selling plan policy which describes the recurring billing details. view |
| pricing_polices | array | Selling plan pricing details. view |
Delivery Policy
| Attribute | Type | Description |
|---|---|---|
| frequency | integer | The number of intervals between deliveries. |
| interval | enum | The delivery frequency, it can be either: day, week, month or year. |
| auto_expire | object | An expiration policy for a subscription that automatically cancels the subscription after a set interval. view |
| anchors | object | The specific anchor dates upon which the delivery interval calculations should be made. view |
| pre_anchor_behavior | enum | The fulfilment or delivery behaviour of the first fulfilment is when the order is placed before the anchor. The default value for this field is ASAP. |
| cutoff | integer | Number of days which represent a buffer period for orders to be included in a cycle. |
Auto Expire
| Attribute | Type | Description |
|---|---|---|
| frequency | integer | The number of intervals between deliveries. Note that it should be multiples of billing frequency. |
| interval | enum | The auto expire frequency, it can be either: day, week, month or year. Note that it should be same as delivery frequency. |
Anchors
| Attribute | Type | Description |
|---|---|---|
| type | enum | Represents the anchor type, it can be one of WEEKDAY, or MONTHDAY. |
| value | array | If the type is WEEKDAY the values are to be between Monday - Sunday, and if the type is MONTHDAY the values are to be between 1-31. |
Billing Policy
| Attribute | Type | Description |
|---|---|---|
| frequency | integer | The number of intervals between billings. |
| interval | enum | The billing frequency, it can be either: day, week, month or year. |
Pricing Policies
| Attribute | Type | Description |
|---|---|---|
| discount | array | Represents the discount of a subscription or deferred purchase option selling plan. The selling plan discount works with the billing and delivery policy to determine the final price. Discounts are divided among fulfillments. For example, a subscription with a $10 discount and two deliveries will have a $5 discount applied to each delivery. view |
Discount
| Attribute | Type | Description |
|---|---|---|
| type | enum | The selling plan supports a pricing policy of percentage-off adjustments. |
| value | string | The percentage value of a selling plan’s pricing policy. |
Shipping Policy
| Attribute | Type | Description |
|---|---|---|
| type | enum | Represents the shipping policy of a subscription selling plan. The plan supports two types of shipping policies: recurpay_flat_rates, offering a fixed delivery price for the subscription, and ecommerce_calculated_price, which calculates the delivery price according to the ecommerce shipping policy. |
| price | string | The shipping price of the shipping policy type is recurpay_flat_rates. |
