v1

latestOpenAPI 3.1.0AGPL-3.0-only2026-07-1773264353.7 KB
Subscriptions

Create subscription

Create a new subscription for a customer with a specific plan.

post/api/v1/subscriptions

Request body

activation_condition'ON_START' | 'ON_CHECKOUT' | 'MANUAL' required
auto_advance_invoicesboolean
billing_day_anchorinteger nullable
charge_automaticallyboolean
coupon_codesstring[]
customer_id_or_aliasstring CustomerId or customer alias required
end_datestring date
invoice_memostring
net_termsinteger
plan_idstring MeteroidId required
purchase_orderstring nullable
skip_past_invoicesboolean

Migration mode: when true with a past start_date, skip creating invoices for past cycles. The subscription will be set to the current billing period with correct cycle_index.

start_datestring date required
trial_daysinteger
versioninteger

Example request

{
  "add_ons": [
    {
      "add_on_id": "add_7n42DGM5Tflk9n8mt7Fhc7",
      "customization": {
        "price_entry": {
          "id": "pri_7n42DGM5Tflk9n8mt7Fhc7"
        }
      }
    }
  ],
  "end_date": "2025-11-01",
  "payment_methods_config": {
    "account_id": "ba_7n42DGM5Tflk9n8mt7Fhc7"
  },
  "plan_id": "plan_7n42DGM5Tflk9n8mt7Fhc7",
  "price_components": {
    "extra_components": [
      {
        "price_entry": {
          "id": "pri_7n42DGM5Tflk9n8mt7Fhc7"
        },
        "product_ref": {
          "id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
        }
      }
    ],
    "overridden_components": [
      {
        "component_id": "price_7n42DGM5Tflk9n8mt7Fhc7",
        "price_entry": {
          "id": "pri_7n42DGM5Tflk9n8mt7Fhc7"
        }
      }
    ],
    "parameterized_components": [
      {
        "component_id": "price_7n42DGM5Tflk9n8mt7Fhc7"
      }
    ],
    "remove_components": [
      "price_7n42DGM5Tflk9n8mt7Fhc7"
    ]
  },
  "start_date": "2024-11-01"
}

Response

Subscription successfully created

activated_atstring date-time nullable

When the subscription was activated (first payment or activation condition met)

auto_advance_invoicesboolean required
billing_day_anchorinteger required
billing_start_datestring date nullable

When billing started (after any trial period)

charge_automaticallyboolean required
checkout_urlstring nullable
created_atstring date-time required

When the subscription was created

currency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNH' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' required
current_period_endstring date nullable

Current billing period end date

current_period_startstring date required

Current billing period start date

customer_aliasstring nullable
customer_idstring MeteroidId required
customer_namestring required
end_datestring date nullable

When the subscription ends (if set)

idstring MeteroidId required
invoice_memostring nullable

Default memo for invoices

mrr_centsinteger required

Monthly recurring revenue in cents

net_termsinteger required

Payment terms in days (0 = due on issue)

period'MONTHLY' | 'QUARTERLY' | 'SEMIANNUAL' | 'ANNUAL' required
plan_idstring MeteroidId required
plan_namestring required
plan_versioninteger required
plan_version_idstring MeteroidId required
purchase_orderstring nullable
start_datestring date required

When the subscription contract starts (benefits apply from this date)

status'PENDING_ACTIVATION' | 'PENDING_CHARGE' | 'TRIAL_ACTIVE' | 'ACTIVE' | 'TRIAL_EXPIRED' | 'PAUSED' | 'SUSPENDED' | 'CANCELLED' | 'COMPLETED' | 'SUPERSEDED' | 'ERRORED' required
trial_durationinteger nullable

Trial duration in days

Example response

{
  "add_ons": [
    {
      "add_on_id": "add_7n42DGM5Tflk9n8mt7Fhc7",
      "fee": {
        "metric_id": "bm_7n42DGM5Tflk9n8mt7Fhc7"
      },
      "id": "sub_add_7n42DGM5Tflk9n8mt7Fhc7"
    }
  ],
  "applied_coupons": [
    {
      "applied_coupon": {
        "coupon_id": "cou_7n42DGM5Tflk9n8mt7Fhc7",
        "id": "sub_cou_7n42DGM5Tflk9n8mt7Fhc7"
      },
      "coupon": {
        "id": "cou_7n42DGM5Tflk9n8mt7Fhc7"
      }
    }
  ],
  "components": [
    {
      "fee": {
        "metric_id": "bm_7n42DGM5Tflk9n8mt7Fhc7"
      },
      "price_component_id": "price_7n42DGM5Tflk9n8mt7Fhc7",
      "product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
    }
  ],
  "currency": "EUR",
  "customer_id": "cus_7n42DGM5Tflk9n8mt7Fhc7",
  "entitlements": [
    {
      "feature_id": "feat_7n42DGM5Tflk9n8mt7Fhc7",
      "id": "ent_7n42DGM5Tflk9n8mt7Fhc7"
    }
  ],
  "id": "sub_7n42DGM5Tflk9n8mt7Fhc7",
  "payment_methods_config": {
    "account_id": "ba_7n42DGM5Tflk9n8mt7Fhc7"
  },
  "plan_id": "plan_7n42DGM5Tflk9n8mt7Fhc7",
  "plan_version_id": "plv_7n42DGM5Tflk9n8mt7Fhc7"
}