Skip to Content
API ReferenceProduct Variants

Variant subscription settings

Read or change how buyers may pause, move, and renew a subscription variant.

A published subscription variant decides how its buyers may pause their subscription, move their billing date, and whether delivery repeats on each renewal. Read the settings with GET, then send the state you read as expected_state with PATCH, so you never overwrite a change you have not seen.

GET
/v2/products/{product}/variants/{variant}/subscription-settings

Get how buyers of a published subscription variant may pause (pause_policy) and move their billing date (billing_date_policy), whether its delivery is repeated on each renewal (renewal_policy), and the plan changes offered to them (change_paths). A setting that was never saved shows the default the dashboard would save. state identifies these values; send it back as expected_state when you update them. Requires the listing API-key ability and the listing permission in your team role. A one-time variant or a draft variant has no such settings and returns 404, as does a variant of another product. OAuth callers use the admin grant and select a store with X-STORE. Current membership and role permissions apply to every request.

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Path Parameters

product*integer

The product path parameter.

variant*integer

The variant path parameter.

Header Parameters

X-STORE?string

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X GET 'https://sell.app/api/v2/products/1/variants/4/subscription-settings' \  -H 'X-STORE: launch-lab'
{  "data": {    "product_id": 1,    "variant_id": 4,    "pause_policy": {      "max_pause_days": 90,      "min_active_days_between_pauses": 30,      "max_pauses_per_period": 2,      "requires_resume_date": true    },    "billing_date_policy": {      "max_shift_days": 14,      "max_changes_per_period": 1,      "allowed_day_min": null,      "allowed_day_max": null,      "preview_required": true    },    "renewal_policy": {      "redeliver_on_renewal": true    },    "change_paths": [      {        "target_variant_id": 5,        "target_title": "Annual membership",        "effective_timing": "next_renewal",        "proration_behavior": "none",        "customer_label": "Switch to yearly billing",        "is_active": true      }    ],    "state": "3f9a1c0e7b2d4a6f8e1c5b9d0a7f3e2c4b6d8a0f1e3c5a7b9d2f4e6a8c0b1d3e"  }}
PATCH
/v2/products/{product}/variants/{variant}/subscription-settings

Update the pause, billing date, and renewal settings of a published subscription variant. Send only the policies you change: a policy you leave out is not written, and a field you leave out inside a policy keeps its current value. The result is checked as a whole, as the dashboard checks it. Plan changes (change_paths) cannot be changed here. Requires the listing API-key ability and the listing permission in your team role. Send the state from your last read as expected_state to refuse the update when someone changed the settings in the meantime; that refusal is 422 on expected_state. Repeating the same body without expected_state gives the same result. A one-time variant or a draft variant returns 422 on variant_id. A body without any policy returns 422 on pause_policy, an unknown field inside a policy returns 422 on that policy, and a value out of range returns 422 on the field, such as billing_date_policy.allowed_day_max. A variant of another product returns 404. OAuth callers use the admin grant and select a store with X-STORE. Current membership and role permissions apply to every request.

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Path Parameters

product*integer

The product path parameter.

variant*integer

The variant path parameter.

Header Parameters

X-STORE?string

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Request Body

application/json
  1. body
pause_policy?

How buyers may pause the subscription.

billing_date_policy?

How buyers may move their next billing date.

renewal_policy?

What happens on each renewal.

expected_state?|

The state from your last read. The update is refused when the settings changed since.

Length64 <= length <= 64

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://sell.app/api/v2/products/1/variants/4/subscription-settings' \  -H 'X-STORE: launch-lab' \  -H 'Content-Type: application/json' \  -d '{  "pause_policy": {    "max_pause_days": 30  },  "renewal_policy": {    "redeliver_on_renewal": false  },  "expected_state": "3f9a1c0e7b2d4a6f8e1c5b9d0a7f3e2c4b6d8a0f1e3c5a7b9d2f4e6a8c0b1d3e"}'
{  "data": {    "product_id": 1,    "variant_id": 4,    "pause_policy": {      "max_pause_days": 30,      "min_active_days_between_pauses": 30,      "max_pauses_per_period": 2,      "requires_resume_date": true    },    "billing_date_policy": {      "max_shift_days": 14,      "max_changes_per_period": 1,      "allowed_day_min": null,      "allowed_day_max": null,      "preview_required": true    },    "renewal_policy": {      "redeliver_on_renewal": false    },    "change_paths": [      {        "target_variant_id": 5,        "target_title": "Annual membership",        "effective_timing": "next_renewal",        "proration_behavior": "none",        "customer_label": "Switch to yearly billing",        "is_active": true      }    ],    "state": "8c2e4a6b0d1f3e5a7c9b2d4f6e8a0c1b3d5f7a9e2c4b6d8f0a1c3e5b7d9f2a4c"  }}