API Reference

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
    },
    "product_count": 1,
    "status": "active",
    "created_at": "2024-03-21 16:54:59",
    "updated_at": "2024-05-17 22:36:11"
}

The Plan Resource

AttributeTypeDescription
idintegerreadonlyAn 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_idstringreadonlyRepresents a unique identifier of a Shopify selling plan group, this can be null in case of any other platform than Shopify.
namestringThe buyer-facing label of the plan.
descriptionstringA description of the plan. Supports HTML formatting.
selling_plansarrayAn array of selling plans, each representing a different version of the plan such as monthly plan, and yearly plan. view
shipping_policyobjectThe shipping policy defines the delivery method for the specific purchase, which can be Recurpay flat rates or E-commerce calculated rates. view
product_countintegerreadonlyA count of products associated with the plan.
statusenumThe status of the plan.
created_atstringreadonlyThe autogenerated date and time (ISO 8601 format) when the plan was created in Recurpay.
updated_atstringreadonlyThe date and time (ISO 8601 format) when the plan was last modified.

Selling Plans

AttributeTypeDescription
idintegerreadonlyAn 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_idstringreadonlyRepresents a unique identifier of a Shopify selling plan, this can be null in case of any other platform than Shopify.
delivery_policyobjectA selling plan policy which describes the delivery details. view
billing_policyobjectA selling plan policy which describes the recurring billing details. view
pricing_policesarraySelling plan pricing details. view

Delivery Policy

AttributeTypeDescription
frequencyintegerThe number of intervals between deliveries.
intervalenumThe delivery frequency, it can be either: day, week, month or year.
auto_expireobjectAn expiration policy for a subscription that automatically cancels the subscription after a set interval. view
anchorsobjectThe specific anchor dates upon which the delivery interval calculations should be made. view
pre_anchor_behaviorenumThe 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.
cutoffintegerNumber of days which represent a buffer period for orders to be included in a cycle.

Auto Expire

AttributeTypeDescription
frequencyintegerThe number of intervals between deliveries. Note that it should be multiples of billing frequency.
intervalenumThe auto expire frequency, it can be either: day, week, month or year. Note that it should be same as delivery frequency.

Anchors

AttributeTypeDescription
typeenumRepresents the anchor type, it can be one of WEEKDAY, or MONTHDAY.
valuearrayIf 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

AttributeTypeDescription
frequencyintegerThe number of intervals between billings.
intervalenumThe billing frequency, it can be either: day, week, month or year.

Pricing Policies

AttributeTypeDescription
discountarrayRepresents 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

AttributeTypeDescription
typeenumThe selling plan supports a pricing policy of percentage-off adjustments.
valuestringThe percentage value of a selling plan’s pricing policy.

Shipping Policy

AttributeTypeDescription
typeenumRepresents 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.
pricestringThe shipping price of the shipping policy type is recurpay_flat_rates.