Vatly
Api Reference

Subscription Plans

On this page, we'll dive into the different subscription plan endpoints you can use to query your plans programmatically.

The subscription plan model

The subscription plan model contains all the information about the subscription plans you create, including the name, description, price, and billing interval.

Properties

NameTypeDescription
idstringUnique identifier for the subscription plan (always starts with subscription_plan_).
resourcestringThe resource type. Always subscription_plan.
testmodebooleanWhether this plan is in test mode.
namestringDisplay name of the plan.
descriptionstringDetailed description of the plan.
basePriceMoneyPrice per billing interval. A Money object with value (decimal string) and currency (ISO 4217 code).
intervalstringBilling interval unit. Can be day, week, month, or year.
intervalCountintegerNumber of interval units between billing cycles. For example, interval: month with intervalCount: 3 bills every 3 months.
statusstringCurrent status of the plan. Can be active (plan is active and can be subscribed to), pending (plan is awaiting approval), or rejected (plan has been rejected).
createdAtstringWhen this plan was created (ISO 8601 format).
linksobjectHATEOAS links to related resources. Contains self link.

List all subscription plans

GET /v1/subscription-plans

This endpoint retrieves a paginated list of all subscription plans. Only plans with active status can be used in checkouts.

Optional query parameters

NameTypeDescription
limitintegerThe number of subscription plans to return (default: 10, max: 100).
startingAfterstringA cursor for use in pagination. Returns results after this plan ID.
endingBeforestringA cursor for use in pagination. Returns results before this plan ID.
curl -G https://api.vatly.com/v1/subscription-plans \
  -H "Authorization: Bearer live_your_api_key_here" \
  -d limit=10

Create a subscription plan

POST /v1/subscription-plans

Creates a new subscription plan for the authenticated merchant, in the testmode determined from the API token.

A plan created with a live_ token starts in pending status and must be approved by Vatly before it can be used in checkouts — the same review that applies to plans created in the dashboard. A plan created with a test_ token is auto-approved (active) so you can trial checkout immediately.

Constraints:

  • productType must be saas — e-books are one-off purchases and cannot be sold on a recurring basis.
  • The day interval is sandbox-only; live plans support week, month, and year.
  • intervalCount is bounded per unit: up to 365 days, 52 weeks, or 12 months. year always bills once per year (intervalCount is ignored).

Required attributes

NameTypeDescription
namestringDisplay name of the plan (3–255 characters).
descriptionstringDetailed description of the plan.
basePriceMoneyPrice per billing interval. A Money object with value (decimal string) and currency (ISO 4217 code).
productTypestringTax product classification. Must be saas.
intervalstringBilling interval unit. One of day (sandbox-only), week, month, or year.
intervalCountintegerNumber of interval units between billing cycles (at least 1).
curl https://api.vatly.com/v1/subscription-plans \
  -H "Authorization: Bearer live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Monthly",
    "description": "Full access to all Pro features, billed monthly",
    "basePrice": { "value": "29.00", "currency": "EUR" },
    "productType": "saas",
    "interval": "month",
    "intervalCount": 1
  }'

Retrieve a subscription plan

GET /v1/subscription-plans/:id

This endpoint retrieves a specific subscription plan by its ID.

URL parameters

NameTypeDescription
idstringThe ID of the subscription plan to retrieve.
curl https://api.vatly.com/v1/subscription-plans/subscription_plan_Bm7xNvPwKr3YjTgHcZaE \
  -H "Authorization: Bearer live_your_api_key_here"
Copyright © 2026