SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Storefront API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Bootstrap
    Get shop info and settings
Product
    Get list of productsGet product by IDGet variant or pricing by IDGet plan by ID
Bundle
    Get list of bundlesGet bundle by IDQuote bundleGet list of bundle group itemsGet list of bundle itemsGet the list of bundle items associated with multiple bundles
Survey
    Get survey by ID
Cart
    Init cartGet cart by IDUpdate cart by IDGet cart gifting datesGet cart start datesGet shipping methodsGet local pickupsValidate the cartAttach the customer to the cart
Cart Item
    Add cart itemUpdate cart itemDelete cart item
Checkout
    Make purchase from the cart
Auth
    LoginOtp LoginOtp GenerateSocial LoginRegisteredRegister
Customer
    Get the current customerGet the current customer referral infoUpdate customer
Address
    Get list of addressStore addressUpdate addressDelete address
Pickup Info
    Get list of pickup infosStore pickup infoUpdate pickup infoDelete pickup info
Wallet
    Store payment methodGet list of payment methodsStore payment methodDelete payment methodSet default payment method
Subscription
    Get list of subscriptionsShow subscriptionUpdate subscriptionUpdate subscription survey preferences by Subscription IDUpdate subscription bundle data by Subscription IDCancel a subscriptionUndo cancellationUndo a scheduled cancellationRequest a cancellationWithdraw a cancellation requestSkip upcoming renewalsPause the subscriptionResume the subscriptionProlong an active skipReactivate the subscriptionUpdate shipping address and methodUpdate subscription payment methodGet shipping methodsGet local pickupsList upcoming billing datesList allowed skipping datesList allowed resume datesChange the plans of the subscription's itemsList the plans the subscription can move toCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundleChange the plan of a subscription itemChange the variant of a one-time item
Order
    Get list of ordersGet order by ID
Invoice
    Get list of invoicesGet invoice by ID
Payment Intent
    Confirm payment intentGet payment intent by ID
Funnels
    Get the current pre purchase funnel step by IDRefresh the funnel progressAccept the pre purchase funnel stepReject the pre purchase funnel stepGet the current mid purchase funnel step by IDRefresh the funnel progressAccept the mid purchase funnel stepReject the mid purchase funnel step
Countries
    Get list of countries
Out Of Stock
    Subscribe to the out of stock
Cancellation
    Get shop cancellation reasons
Metafield
    Get shop's metafields
Product Collection
    Get list of product collectionsGet product collection by IDGet list of collection groups with items
Lead
    Store the shop lead

Subscription

Storefront Subscription API endpoints

Endpoints
  • GET/subscriptions
  • GET/subscriptions/{subscription_id}
  • PATCH/subscriptions/{subscription_id}
  • PATCH/subscriptions/{subscription_id}/preferences
  • PATCH/subscriptions/{subscription_id}/bundle
  • POST/subscriptions/{subscription_id}/cancel
  • DELETE/subscriptions/{subscription_id}/undo_cancellation
  • POST/subscriptions/{subscription_id}/undo_set_to_cancel
  • POST/subscriptions/{subscription_id}/cancellation_request
  • POST/subscriptions/{subscription_id}/undo_cancellation_request
  • POST/subscriptions/{subscription_id}/skip
  • POST/subscriptions/{subscription_id}/pause
  • POST/subscriptions/{subscription_id}/resume
  • POST/subscriptions/{subscription_id}/prolong_skipping
  • POST/subscriptions/{subscription_id}/reactivate
  • PATCH/subscriptions/{subscription_id}/address
  • PATCH/subscriptions/{subscription_id}/payment_method
  • GET/subscriptions/{subscription_id}/shipping_methods
  • GET/subscriptions/{subscription_id}/local_pickups
  • GET/subscriptions/{subscription_id}/billing_dates
  • GET/subscriptions/{subscription_id}/skipping_dates
  • GET/subscriptions/{subscription_id}/resume_dates
  • POST/subscriptions/{subscription_id}/change_plans
  • GET/subscriptions/{subscription_id}/plans
  • POST/subscriptions/{subscription_id}/items
  • GET/subscriptions/{subscription_id}/items/{item_id}
  • PATCH/subscriptions/{subscription_id}/items/{item_id}
  • DELETE/subscriptions/{subscription_id}/items/{item_id}
  • PATCH/subscriptions/{subscription_id}/items/{item_id}/preferences
  • PATCH/subscriptions/{subscription_id}/items/{item_id}/bundle
  • POST/subscriptions/{subscription_id}/items/{item_id}/change_plan
  • POST/subscriptions/{subscription_id}/items/{item_id}/change_variant

Get list of subscriptions

GET /subscriptions

An API endpoint to get list of subscriptions.

Query parameters

pageoptionalinteger

Page

per_pageoptionalinteger

Entities per page

statusesoptionalstring[]

Filter by subscription status

pausedoptionalinteger

Filter by the subscription paused flag (0 or 1). Skipping until a date (skipping_until) does not set this flag.

Possible values: 0, 1.

expandoptionalstring[]

Expandable relations

Returnsobject

Subscriptions list response

Error responses

401object

Missing or invalid customer token.

422object

page is not a positive integer, per_page is outside 1-100, statuses is not an array or holds an unknown or duplicate status, paused is not 0 or 1, or expand is not an array.

curl https://api.subbly.co/storefront/v1/subscriptions \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ] }

Show subscription

GET /subscriptions/{subscription_id}

An api call to show the subscription.

Path parameters

subscription_idRequiredinteger

Subscription ID

Query parameters

expandoptionalstring[]

Expandable relations

ReturnsSubscription

Subscription object response

Error responses

401object

Missing or invalid customer token.

404object

No subscription with this ID exists, or it belongs to another customer.

422object

expand is not an array.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update subscription

PATCH /subscriptions/{subscription_id}

An api call to update the subscription. product_id is deprecated: it runs as POST /subscriptions/{subscription_id}/change_plans with one pick for the subscription's only subscription item, in the same request as the other fields.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Update subscription

product_idoptionalintegerDeprecated

Deprecated: use POST /subscriptions/{subscription_id}/change_plans. Runs as one pick for the subscription's only subscription item. The plan must be a published, non-archived subscription plan of the shop, and either share the current plan's parent product or sit in the current product's change-product collection. Configurable bundles are not allowed through the collection, and a sibling on another configurable bundle needs its contents picked through POST /subscriptions/{subscription_id}/items/{item_id}/change_plan. Rejected for subscriptions with multiple subscription items โ€” change the plans per item via POST /subscriptions/{subscription_id}/change_plans.

gift_recipient_emailoptionalstring | null

Email of the gift recipient. Send null to clear it.

Format: email.

gift_messageoptionalstring | null

Gift message. Send null to clear it.

quantityoptionalintegerDeprecated

Subscription-level quantity. Rejected for subscriptions with multiple subscription items โ€” update the quantity per item via PATCH /subscriptions/{subscription_id}/items/{item_id}.

metadataoptionalobject[] | null

List of metadata and their values

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active). With product_id, the guards of POST /subscriptions/{subscription_id}/change_plans apply as well: the subscription is paused (subscription_paused) or skipping (already_skipping), or the shop does not allow plan changes (plan_change_disabled). The write refuses the pick when it re-checks it under the lock: another subscription item is on another billing cycle (plan_change_items_left_behind, "Item 2 must also be moved to a plan with the same billing cycle.").

401object

Missing or invalid customer token.

404object

No subscription with this ID exists, or it belongs to another customer.

422object

product_id is not a published subscription variant of the shop, is not a valid product change for this subscription (not a sibling variant and not in the change-product collection, a configurable bundle, or on the other membership kind: "The selected plan is not available for this item."), is a configurable bundle other than the current one ("The selected plan needs new bundle contents. Pick it with its contents using POST subscriptions/{subscription}/items/{item}/change_plan."), or the subscription has several subscription items ("This subscription has multiple subscription items. Change the plans per item using POST subscriptions/{subscription}/change_plans."); quantity is below 1, above 1 when the shop turns off the subscription quantity selector, or the subscription has several subscription items ("This subscription has multiple subscription items. Update quantity per item using PATCH subscriptions/{subscription}/items/{item}."); metadata holds an unknown, duplicate or wrongly typed metadata entry, or adds, changes or removes a non-editable one; gift_recipient_email is not a valid email; or gift_message is longer than 255 characters.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "product_id": 1, "gift_recipient_email": "customer@example.com", "gift_message": "gift_message", "quantity": 1, "metadata": [ { "id": 1, "values": [ { "id": 10, "value": "Blue" } ] } ] }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update subscription survey preferences by Subscription ID

PATCH /subscriptions/{subscription_id}/preferences

Deprecated. Do not use it in new integrations.

Update the subscription survey preferences.

Deprecated. This endpoint operates on the subscription as a whole and is not available for subscriptions that have multiple subscription items โ€” for those it responds with 410 Gone (error code endpoint_deprecated). Use PATCH /subscriptions/{subscription_id}/items/{item_id}/preferences instead.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Update subscription survey preferences

preferencesRequiredobject[]
update_ordersoptionalboolean

Update order preferences in the awaiting_delivery and future_shipment status. Allowed when the survey appearance type is after checkout, or when the sync_orders_preferences_on_subscription_update shop setting is enabled.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), or a chosen answer is out of stock (out_of_stock).

404object

No subscription with this ID exists, or it belongs to another customer.

410object

Endpoint deprecated for this subscription. Returned when the subscription has multiple subscription items โ€” use the per-item preferences endpoint.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/preferences \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "preferences": [ { "question_id": 1, "answers": [ { "id": 1, "content": "content", "quantity": 1 } ] } ], "update_orders": true }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update subscription bundle data by Subscription ID

PATCH /subscriptions/{subscription_id}/bundle

Deprecated. Do not use it in new integrations.

Deprecated: use POST /subscriptions/{subscription_id}/change_plans with a pick that carries bundle. This route runs as that pick for the subscription's only subscription item (plan_id = product_id when sent, else the current plan), with quantity written to the item in the same request. Only applicable when the subscription has exactly one subscription item; for subscriptions with multiple subscription items update each item's bundle via PATCH /subscriptions/{subscription_id}/items/{item_id}/bundle.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Update subscription bundle data for a single-item subscription. Only applicable when the subscription has exactly one subscription item.

bundleRequiredSubscriptionBundleBody

Bundle payload for the subscription's single subscription item. Rejected for subscriptions that have multiple subscription items โ€” update each item's bundle via PATCH /subscriptions/{subscription_id}/items/{item_id}/bundle.

quantityoptionalinteger | null

Subscription item quantity. Rejected for subscriptions with multiple subscription items โ€” set the quantity per item instead.

product_idoptionalinteger | null

Target subscription product (a product change). Must share the current product's bundle or belong to its change-product collection.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active). The route runs as POST /subscriptions/{subscription_id}/change_plans and takes its guards as well: the subscription is paused (subscription_paused) or skipping (already_skipping), or the shop does not allow plan changes (plan_change_disabled). The write refuses the pick when it re-checks it under the lock: another subscription item is on another billing cycle (plan_change_items_left_behind, "Item 2 must also be moved to a plan with the same billing cycle.").

404object

No subscription with this ID exists, or it belongs to another customer.

422object

bundle is missing or lacks the items key; the product is not a configurable bundle ("The selected product must have a configurable bundle."); bundle.preferences or bundle.items do not fit the bundle; the subscription has several subscription items ("This subscription has multiple subscription items. Update each item's bundle using PATCH subscriptions/{subscription}/items/{item}/bundle."); product_id is missing while the current product is not a configurable bundle, or is not a published subscription variant that shares the bundle or sits in the change-product collection, or is on the other membership kind ("The selected plan is not available for this item."); or quantity is below 1, above 1 when the shop turns off the subscription quantity selector, or the subscription has several subscription items.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/bundle \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "bundle": { "preferences": [ { "attribute_id": 1, "metafield_id": 1, "values": [ null ] } ], "items": [ { "product_id": 1, "quantity": 1 } ] }, "quantity": 1, "product_id": 1 }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Cancel a subscription

POST /subscriptions/{subscription_id}/cancel

Cancels a subscription for a given reason.

Path parameters

subscription_idRequiredinteger

The ID of the subscription to cancel

Request body

Cancellation Reasons Body

reason_idoptionalinteger | null

The ID of one of the shop's cancellation reasons (GET /cancellation/reasons); any other ID answers 422. Stored only when the shop's plan includes cancellation reasons, and silently dropped otherwise.

extra_feedbackoptionalstring | null

Additional feedback from the customer

typeoptionalstring | null

Optional cancellation type. Only 'end_of_period' is accepted; any other value responds with 400 (error code cancellation_type_not_allowed). When omitted, committed subscriptions default to cancel at end of commitment; non-committed subscriptions cancel immediately.

Possible values: end_of_period.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), is already scheduled for cancellation or has a pending cancellation request (cancellation_scheduled), the shop has cancellation requests enabled so the customer must request a cancellation instead (cancellation_request_required), or type is a value other than end_of_period (cancellation_type_not_allowed).

404object

No subscription with this ID exists, or it belongs to another customer.

422object

reason_id is not a cancellation reason of the shop; extra_feedback is not a string or is longer than 255 characters; or expand is not an array.

429object

Another rate-limited request from the same customer (or from the same IP when no customer token is sent) is still in progress.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/cancel \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "reason_id": 1, "extra_feedback": "extra_feedback", "type": "end_of_period" }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Undo cancellation

DELETE /subscriptions/{subscription_id}/undo_cancellation

Clears a cancellation scheduled for the end of the current billing period. A cancellation scheduled for the end of the commitment term is cleared through POST undo_set_to_cancel.

Path parameters

subscription_idRequiredinteger

The ID of the subscription

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), or no period-end cancellation is scheduled (no_cancellation_scheduled).

404object

No subscription with this ID exists, or it belongs to another customer.

curl -X DELETE https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/undo_cancellation \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Undo a scheduled cancellation

POST /subscriptions/{subscription_id}/undo_set_to_cancel

Clears a cancellation scheduled for the end of the commitment term. A cancellation scheduled for the end of the current billing period is cleared through DELETE undo_cancellation.

Path parameters

subscription_idRequiredinteger

Subscription ID

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), or no end-of-commitment cancellation is scheduled (no_cancellation_scheduled).

404object

The subscription does not exist or does not belong to the customer.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/undo_set_to_cancel \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Request a cancellation

POST /subscriptions/{subscription_id}/cancellation_request

Flags the subscription as having a pending cancellation request for the merchant to review. Available only when the shop has cancellation requests enabled.

Path parameters

subscription_idRequiredinteger

Subscription ID

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), the shop has cancellation requests disabled (cancellation_request_disabled), or a cancellation request is already pending (cancellation_already_requested).

404object

The subscription does not exist or does not belong to the customer.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/cancellation_request \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Withdraw a cancellation request

POST /subscriptions/{subscription_id}/undo_cancellation_request

Clears a pending cancellation request.

Path parameters

subscription_idRequiredinteger

Subscription ID

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), or it has no pending cancellation request (no_cancellation_request).

404object

The subscription does not exist or does not belong to the customer.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/undo_cancellation_request \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Skip upcoming renewals

POST /subscriptions/{subscription_id}/skip

Skips the subscription until the given date. skip_until must be one of the dates returned by GET /subscriptions/{subscription_id}/skipping_dates.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Skip subscription

skip_untilRequiredstring

Date (Y-m-d, after today) to skip until. Must be one of the dates from GET /subscriptions/{subscription_id}/skipping_dates.

Format: date.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), paused (subscription_paused), scheduled for cancellation or has a pending cancellation request (cancellation_scheduled), already skipping (already_skipping), waiting to start (subscription_waiting), the shop has skipping disabled (skipping_disabled), the subscription has fewer paid invoices than the shop's skipping minimum term (skipping_min_term_not_reached), or it is within its commitment term, meaning fewer paid invoices than the commitment's total payments or the shop auto-extends commitments (subscription_committed), or skip_until is not one of the allowed skipping dates (skip_date_not_allowed).

404object

The subscription does not exist or does not belong to the customer.

422object

Validation failed: skip_until is missing, not a Y-m-d date, or not after today.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/skip \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "skip_until": "2026-11-01" }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Pause the subscription

POST /subscriptions/{subscription_id}/pause

Pauses the subscription until it is resumed. Pausing needs everything skipping needs (the shop allows skipping, the minimum term is reached, the subscription is active, not committed, not paused, skipping or waiting, and no cancellation is scheduled or requested), plus the shop's and the product's pause setting. Read actions.pause to know whether it is allowed.

Path parameters

subscription_idRequiredinteger

Subscription ID

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), paused (subscription_paused), scheduled for cancellation or has a pending cancellation request (cancellation_scheduled), already skipping (already_skipping), waiting to start (subscription_waiting), the shop has skipping disabled (skipping_disabled), the subscription has fewer paid invoices than the shop's skipping minimum term (skipping_min_term_not_reached), or it is within its commitment term, meaning fewer paid invoices than the commitment's total payments or the shop auto-extends commitments (subscription_committed), the shop has customer pausing disabled (pause_disabled), or the product does not allow pausing (pause_disabled_for_product).

404object

The subscription does not exist or does not belong to the customer.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/pause \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Resume the subscription

POST /subscriptions/{subscription_id}/resume

Resumes a paused or skipping subscription. When the shop allows choosing a resume date, next_payment_date selects the next renewal from the dates returned by GET /subscriptions/{subscription_id}/resume_dates.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Resume subscription

next_payment_dateoptionalstring | null

Optional next renewal date (Y-m-d, today or later). Accepted only when the shop allows choosing a resume date; must be one of the dates from GET /subscriptions/{subscription_id}/resume_dates.

Format: date.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), neither paused nor skipping (not_paused_or_skipping), next_payment_date was sent but the shop does not allow choosing a resume date (resume_date_not_allowed), or it is not one of the allowed resume dates (next_payment_date_not_allowed).

404object

The subscription does not exist or does not belong to the customer.

422object

Validation failed: next_payment_date is not a Y-m-d date or is in the past.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/resume \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "next_payment_date": "2026-11-01" }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Prolong an active skip

POST /subscriptions/{subscription_id}/prolong_skipping

Extends the current skipping period of a subscription that is already skipping. Each skip can be prolonged once, and only when the shop allows it.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Prolong subscription skipping

skip_untilRequiredstring

New date (Y-m-d, after today) to skip until. Must be a valid billing date after the current skipping period.

Format: date.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), not currently skipping (not_skipping), its skip was already prolonged (skipping_already_prolonged), or the shop does not allow prolonging (prolong_skipping_disabled).

404object

The subscription does not exist or does not belong to the customer.

422object

Validation failed: skip_until is missing, not a Y-m-d date, not after today, or not a valid billing date.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/prolong_skipping \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "skip_until": "2026-11-01" }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Reactivate the subscription

POST /subscriptions/{subscription_id}/reactivate

Reactivates a cancelled or expired subscription. When the shop reactivates with an immediate charge, renewal_date is ignored and the subscription renews right away; otherwise it is required and picks the next renewal from the next three billing dates.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Reactivate subscription

renewal_dateoptionalstring | null

Next renewal date (Y-m-d, today or later), one of the next three billing dates. Required when the shop does not reactivate with an immediate charge; ignored when it does (a malformed value still answers 422).

Format: date.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is neither cancelled nor expired (subscription_not_reactivatable), its product is unpublished or archived (product_not_available), the shop has reactivation disabled (reactivation_disabled), renewal_date is missing for a shop that does not reactivate with an immediate charge (renewal_date_required), or it is not one of the next three billing dates (renewal_date_not_allowed).

404object

The subscription does not exist or does not belong to the customer.

422object

Validation failed: renewal_date is not a Y-m-d date or is in the past.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/reactivate \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "renewal_date": "2026-11-01" }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update shipping address and method

PATCH /subscriptions/{subscription_id}/address

Changes the subscription's shipping address, shipping method and, for dynamic-rate methods, the carrier and service. Optionally applies the new address to open orders when the shop allows it and the method is not dynamic; otherwise update_orders_address is ignored.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Update subscription shipping address and method

shipping_address_idoptionalinteger | null

ID of one of the customer's addresses. Required when the product collects a shipping address and not accepted otherwise.

shipping_method_idoptionalinteger | null

ID of a published shipping method of the shop that is available for the address. Required for shippable products and not accepted for digital or gift-card products.

shipping_carrier_idoptionalinteger | null

Carrier ID. Required with shipping_carrier_service for dynamic-rate shipping methods and not accepted otherwise.

shipping_carrier_serviceoptionalstring | null

Carrier service code. Required with shipping_carrier_id for dynamic-rate shipping methods and not accepted otherwise.

update_orders_addressoptionalinteger

Also apply the new address to the subscription's open orders. Honoured only when the shop allows updating order addresses and the shipping method is not dynamic; ignored otherwise.

Possible values: 0, 1.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), or its product neither collects a shipping address nor can carry a shipping method, so there is nothing to update (shipping_not_applicable); a shipping address was sent for a product that does not collect one (shipping_address_not_allowed), is missing for one that does (shipping_address_required), or does not belong to the customer (shipping_address_not_found); a shipping method was sent for a digital or gift-card product (shipping_method_not_allowed), is missing for a shippable one (shipping_method_required), or is not a published method of the shop (shipping_method_not_found); carrier fields were sent for a non-dynamic method (shipping_carrier_not_allowed) or are missing for a dynamic one (shipping_carrier_required).

404object

The subscription does not exist or does not belong to the customer.

422object

Validation failed: a field has the wrong type, the address type does not fit the shipping method, the shipping method is not available for the address, or the carrier or service is not offered by the method.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/address \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "shipping_address_id": 123, "shipping_method_id": 45, "shipping_carrier_id": 7, "shipping_carrier_service": "ground", "update_orders_address": 1 }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update subscription payment method

PATCH /subscriptions/{subscription_id}/payment_method

An api call to change the payment method the subscription is billed with. Only active subscriptions can be updated.

Path parameters

subscription_idRequiredinteger

Subscription ID

Request body

Update subscription payment method

payment_method_idRequiredinteger

ID of one of the customer payment methods. It has to belong to a gateway matching the live mode of the subscription.

currency_codeRequiredstring

Currency ISO code.

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), the payment method does not exist or does not belong to the customer (payment_method_not_found), or its gateway's live mode does not match the subscription (payment_method_livemode_mismatch).

404object

No subscription with this ID exists, or it belongs to another customer.

422object

payment_method_id is missing, is not an integer, or is a card that has expired ("The selected payment method card has expired."); or currency_code is missing or unknown.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/payment_method \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "payment_method_id": 567, "currency_code": "USD" }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Get shipping methods

GET /subscriptions/{subscription_id}/shipping_methods

Available shipping methods for the subscription when shipped to the given address. Dynamic carrier-rated methods are not returned, so service, carrier_id and carrier are always empty here and customs_fee and future_customs_fee are always 0. shipping_fee is priced from the subscription's current items, while future_shipping_fee is priced with no chargeable items, because the items of an existing subscription are billed by its renewal invoice.

Path parameters

subscription_idRequiredinteger

Subscription ID

Query parameters

address_idRequiredinteger

ID of one of the customer addresses the subscription would ship to. Returns an empty array when a pickup info ID is passed.

expand[]optionalstring[]

Expandable relations (e.g. carrier)

ReturnsCartShippingMethod[]

Array of shipping methods objects

Error responses

401object

Missing or invalid customer token.

404object

The subscription does not exist or does not belong to the customer.

422object

address_id is missing or is not one of the customer's addresses.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/shipping_methods \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
[ { "id": 1, "service": "STANDARD", "carrier_id": 1, "carrier": { "id": 1, "name": "DHL", "service_codes": [ "STANDARD", "EXPRESS" ] }, "type": "shipping_option", "method": { "name": "US Free shipping method", "duration": "2-3 days", "type": "flat_price", "provider": "flavorcloud" }, "shipping_fee": 10, "future_shipping_fee": 0, "customs_fee": 0, "future_customs_fee": 0, "prohibited_products": [ 1 ] } ]

Get local pickups

GET /subscriptions/{subscription_id}/local_pickups

Available local pickups for the subscription. As on shipping_methods, service, carrier_id and carrier are always empty and customs_fee and future_customs_fee are always 0.

Path parameters

subscription_idRequiredinteger

Subscription ID

Query parameters

expand[]optionalstring[]

Expandable relations (e.g. carrier)

ReturnsCartShippingMethod[]

Array of local pickup objects

Error responses

401object

Missing or invalid customer token.

404object

The subscription does not exist or does not belong to the customer.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/local_pickups \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
[ { "id": 1, "service": "STANDARD", "carrier_id": 1, "carrier": { "id": 1, "name": "DHL", "service_codes": [ "STANDARD", "EXPRESS" ] }, "type": "shipping_option", "method": { "name": "US Free shipping method", "duration": "2-3 days", "type": "flat_price", "provider": "flavorcloud" }, "shipping_fee": 10, "future_shipping_fee": 0, "customs_fee": 0, "future_customs_fee": 0, "prohibited_products": [ 1 ] } ]

List upcoming billing dates

GET /subscriptions/{subscription_id}/billing_dates

Returns the subscription's upcoming billing dates starting from its next payment date, either as an explicit list or as a range.

Path parameters

subscription_idRequiredinteger

Subscription ID

ReturnsSubscriptionBillingDates

Billing dates response

Error responses

404object

The subscription does not exist or does not belong to the customer.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/billing_dates \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "available_dates": [ "2026-11-01" ], "range": { "min": "2026-01-15T10:30:00Z", "max": "2026-01-15T10:30:00Z" } }

List allowed skipping dates

GET /subscriptions/{subscription_id}/skipping_dates

Returns the dates a skip may run until, as accepted by POST /subscriptions/{subscription_id}/skip.

Path parameters

subscription_idRequiredinteger

Subscription ID

ReturnsSubscriptionBillingDates

Billing dates response

Error responses

404object

The subscription does not exist or does not belong to the customer.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/skipping_dates \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "available_dates": [ "2026-11-01" ], "range": { "min": "2026-01-15T10:30:00Z", "max": "2026-01-15T10:30:00Z" } }

List allowed resume dates

GET /subscriptions/{subscription_id}/resume_dates

Returns the next renewal dates a customer may pick when resuming, as accepted by POST /subscriptions/{subscription_id}/resume.

Path parameters

subscription_idRequiredinteger

Subscription ID

ReturnsSubscriptionBillingDates

Billing dates response

Error responses

404object

The subscription does not exist or does not belong to the customer.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/resume_dates \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "available_dates": [ "2026-11-01" ], "range": { "min": "2026-01-15T10:30:00Z", "max": "2026-01-15T10:30:00Z" } }

Change the plans of the subscription's items

POST /subscriptions/{subscription_id}/change_plans

Moves the named subscription items to other plans in one write: a plan change, a product change or a billing cycle change. The picks are laid over the current items and every subscription item must end on one billing cycle (plan hash); an item that is not named is never written, so a cycle change names every subscription item. A pick may be a sibling plan of the item's product or a subscription plan of a product in its change collection, published, not archived and on the subscription's membership kind; GET subscriptions/{subscription_id}/plans lists them. The item's current plan only needs the membership kind, so its contents stay changeable after the shop stops selling it. One-time items are never picks. A pick's bundle is accepted only when the target plan is a configurable bundle, required when that bundle is not the item's current bundle, and replaces the contents when sent; on the same bundle the contents are kept without it, while any other bundle, or none, drops them. A pick equal to the current plan is a no-op without bundle and a contents change with it. Survey answers reset unless the target plan's active survey is the one they answer; send the new answers with PATCH subscriptions/{subscription_id}/items/{item_id}/preferences. The subscription's product_id follows the plan of its first (lowest-id) subscription item. Nothing else is written: the renewal date, the commitment, discounts and upcoming orders stay as they are and the change takes effect at the next renewal. Read actions.change_billing_cycle and the items' actions.change_plan to know what is allowed. One subscription item moves on its own with POST subscriptions/{subscription_id}/items/{item_id}/change_plan.

Path parameters

subscription_idRequiredinteger

Subscription ID

Query parameters

expand[]optionalstring[]

List of relations to expand on the subscription (e.g. items.product, product)

Request body

itemsRequiredobject[]

The picks, one per subscription item to move.

ReturnsSubscription

The subscription with its items on their new plans

Error responses

400object

The subscription is not active (subscription_not_active), paused (subscription_paused) or skipping (already_skipping), or the shop does not allow plan changes (plan_change_disabled). The write re-checks the picks under the lock and refuses one that another write made invalid while the change waited for the subscription: a named item was removed (plan_change_item_not_found, "Item 2 is not a subscription item of this subscription."), or an unnamed item is on another billing cycle (plan_change_items_left_behind, "Item 2 must also be moved to a plan with the same billing cycle.").

404object

The subscription does not exist or does not belong to the customer. A request without a valid customer token runs as a guest and gets this response too.

422object

items is missing, empty or not a list; an id is not an item of this subscription ("The item does not belong to this subscription."), is a one-time item ("The item is not a subscription item.") or is named twice ("The item is picked more than once."); a plan_id is not a sibling or change-collection plan available to the item ("The selected plan is not available for this item."); the picks name plans on different cycles ("All picked plans must share one billing cycle." on items.N.plan_id) or leave an unnamed item on another cycle ("Item 2 must also be moved to a plan with the same billing cycle." on items); bundle is sent for a plan that is not a configurable bundle ("The bundle field is not accepted for this plan."), missing while the target's bundle is not the item's current bundle ("The bundle field is required for this plan."), lacks preferences or items ("The bundle field must contain entries for: preferences, items."), or its items or preferences do not fit the target's bundle; or expand is not an array.

429object

Another rate-limited request from the same customer (or from the same IP when no customer token is sent) is still in progress.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/change_plans \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "items": [ { "id": 1, "plan_id": 47, "bundle": { "preferences": [ { "attribute_id": 1, "metafield_id": 1, "values": [ 1 ] } ], "items": [ { "product_id": 1, "quantity": 1 } ] } } ] }'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

List the plans the subscription can move to

GET /subscriptions/{subscription_id}/plans

Lists the plans each subscription item can move to with POST subscriptions/{subscription_id}/change_plans: its product's other plans, then the plans of its change collection in the collection's order, at most 500 per item. current_billing_cycle is the subscription's billing cycle with each item's plans on it; send only the items you change. available_billing_cycles are the other billing cycles every subscription item can reach, shortest period first; a cycle change names every subscription item with a plan from the same row. Only published, unarchived plans on the subscription's membership kind are listed, never an item's own plan; one-time items have no entry. Plans are priced in the subscription's currency. The read has no state guard: it answers for paused or cancelled subscriptions too.

Path parameters

subscription_idRequiredinteger

Subscription ID

Query parameters

expand[]optionalstring[]

List of plan relations to expand (e.g. product, bundle_plan, surveys, shippings)

ReturnsSubscriptionPlanOptions

The current cycle and the available cycles

Error responses

404object

The subscription does not exist or does not belong to the customer.

422object

expand is not an array.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/plans \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "current_billing_cycle": { "frequency_unit": "day", "frequency_count": 1, "shippings_count": 1, "items": [ { "id": 1, "plans": [ {} ] } ] }, "available_billing_cycles": [ { "frequency_unit": "day", "frequency_count": 1, "shippings_count": 1, "items": [ { "id": 1, "plans": [ {} ] } ] } ] }

Create a subscription item

POST /subscriptions/{subscription_id}/items

Add a new item to a subscription. For subscription items the product must share the subscription's billing cycle. The item is not charged immediately โ€” it is billed on the next renewal.

Path parameters

subscription_idRequiredinteger

Subscription ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, bundle, bundle.items, discounts, metadata)

Request body

Create a subscription item

typeRequiredstring

The item type. subscription adds another concurrent subscription line; one_time adds a one-time add-on product.

Possible values: one_time, subscription.

product_idRequiredinteger

The item's product id. For one_time items any valid one-time product is accepted. For subscription items the product must share the subscription's billing cycle.

durationoptionalinteger | null

Optional add-on duration. Only valid when type is one_time; prohibited when type is subscription.

Possible values: 1.

quantityoptionalinteger

Item quantity. Defaults to 1. For subscription items the value is ignored, leaving the quantity at 1, unless the shop has the subscription quantity selector enabled; one-time items are not capped.

bundleoptionalSubscriptionBundleBody

Bundle configuration. Required when type is subscription and the item's product is a configurable bundle; must be omitted otherwise.

metadataoptionalobject[] | null

List of metadata and their values

ReturnsSubscriptionItem

Subscription item object response

Error responses

400object

The subscription is not active (subscription_not_active), the shop does not allow one-time items (addons_disabled), a one-time item was requested for a membership subscription without a shipping address and shipping method (membership_subscription), or a subscription item was requested while the shop's plan does not include multiple subscription products (feature_not_available).

404object

No subscription with this ID exists, or it belongs to another customer.

422object

type is missing or unknown; product_id is missing or is not valid for the item's kind ("The selected product is not a valid one-time product for this shop.", "The selected product must share this subscription's billing cycle."); duration is not 1 or is sent for a subscription item; quantity is not an integer or is below 1 (a subscription item ignores it unless the shop enables the subscription quantity selector); bundle is missing while the product is a configurable bundle, sent while it is not, or its preferences or items do not fit the bundle; metadata holds an unknown, duplicate or wrongly typed metadata entry, or adds, changes or removes a non-editable one; or expand is not an array.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "type": "one_time", "product_id": 1, "duration": 1, "quantity": 1, "bundle": { "preferences": [ { "attribute_id": 1, "metafield_id": 1, "values": [ null ] } ], "items": [ { "product_id": 1, "quantity": 1 } ] }, "metadata": [ { "id": 1, "values": [ { "id": 10, "value": "Blue" } ] } ] }'
Response
{ "id": 1, "subscription_id": 1, "product_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": { "version": 2, "survey_id": 1, "data": [ {} ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Show a subscription item

GET /subscriptions/{subscription_id}/items/{item_id}

Show a single subscription item.

Path parameters

subscription_idRequiredinteger

Subscription ID

item_idRequiredinteger

Subscription item ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, bundle, bundle.items, discounts, metadata)

ReturnsSubscriptionItem

Subscription item object response

Error responses

404object

No subscription or no subscription item with this ID exists, or it belongs to another customer or subscription.

422object

expand is not an array.

curl https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items/{item_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "subscription_id": 1, "product_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": { "version": 2, "survey_id": 1, "data": [ {} ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update a subscription item

PATCH /subscriptions/{subscription_id}/items/{item_id}

Update a subscription item's quantity, duration, product and/or metadata. duration only applies to one_time items. product_id is deprecated: on a subscription item it runs as POST /subscriptions/{subscription_id}/items/{item_id}/change_plan, on a one_time item as POST /subscriptions/{subscription_id}/items/{item_id}/change_variant. For one_time items any one-time product is accepted; for subscription items the product must be another plan of the same parent product or be listed in the current product's change-product collection, must share the subscription's billing cycle unless the item is the subscription's only subscription item, and must not be a configurable bundle. Quantity, duration and product cannot be changed on a coupon-issued item.

Path parameters

subscription_idRequiredinteger

Subscription ID

item_idRequiredinteger

Subscription item ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, bundle, bundle.items, discounts, metadata)

Request body

Update a subscription item

quantityoptionalinteger | null

Item quantity. When omitted the current quantity is kept. On a subscription item a value above 1 is ignored, keeping the current quantity, when the shop's subscription quantity selector is disabled; 1 is always accepted. Cannot be changed on a coupon-issued item.

durationoptionalinteger | null

Add-on duration. Only valid for one_time items; prohibited for subscription items. Set to 1 for a single shipment, or null to recur. Cannot be changed on a coupon-issued item.

Possible values: 1.

product_idoptionalintegerDeprecated

Deprecated: use POST /subscriptions/{subscription_id}/items/{item_id}/change_plan for a subscription item and POST /subscriptions/{subscription_id}/items/{item_id}/change_variant for a one_time item. For one_time items any valid one-time product is accepted. For subscription items the product must be another plan of the same parent product or be listed in the current product's change-product collection, must share the subscription's billing cycle unless the item is the subscription's only subscription item, and must not be a configurable bundle. Cannot be changed on a coupon-issued item.

metadataoptionalobject[] | null

List of metadata and their values

ReturnsSubscriptionItem

Subscription item object response

Error responses

400object

The subscription is not active (subscription_not_active), the item is a one-time item while the shop does not allow one-time items (addons_disabled) or the subscription is a membership without a shipping address and shipping method (membership_subscription), or a quantity was sent for a coupon-issued item (coupon_item_quantity_locked). With product_id, the guards of the write it runs as apply as well: for a subscription item those of POST /subscriptions/{subscription_id}/change_plans, the subscription is paused (subscription_paused) or skipping (already_skipping), or the shop does not allow plan changes (plan_change_disabled); for a one-time item those of POST /subscriptions/{subscription_id}/items/{item_id}/change_variant, a coupon added the item (coupon_item_product_locked). The write refuses the pick when it re-checks it under the lock: another subscription item is on another billing cycle (plan_change_items_left_behind, "Item 2 must also be moved to a plan with the same billing cycle."), or the variant is not a one-time variant of the shop (variant_change_variant_not_allowed).

404object

No subscription or no subscription item with this ID exists, or it belongs to another customer or subscription.

422object

quantity is not an integer or is below 1 (on a subscription item a quantity above 1 is dropped when the shop turns off the subscription quantity selector, and an item that a coupon added answers 400 coupon_item_quantity_locked); duration is sent for a subscription item or changed on a coupon-issued item; product_id is not a valid product for the item's kind ("The selected plan is not available for this item.", "The selected plan is on another billing cycle. Move every subscription item at once with POST subscriptions/{subscription}/change_plans.", "The selected product has a configurable bundle. Pick it with its contents using POST subscriptions/{subscription}/items/{item}/change_plan.", "The selected product is not a valid one-time product for this shop."), or is changed on a coupon-issued item; metadata holds an unknown, duplicate or wrongly typed metadata entry, or adds, changes or removes a non-editable one; or expand is not an array.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items/{item_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "quantity": 1, "duration": 1, "product_id": 1, "metadata": [ { "id": 1, "values": [ { "id": 10, "value": "Blue" } ] } ] }'
Response
{ "id": 1, "subscription_id": 1, "product_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": { "version": 2, "survey_id": 1, "data": [ {} ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Remove a subscription item

DELETE /subscriptions/{subscription_id}/items/{item_id}

Remove a subscription item. The last remaining subscription item cannot be removed โ€” the request responds with 400 (error code last_subscription_item); cancel the subscription instead. The subscription's product_id follows the plan of its first (lowest-id) remaining subscription item.

This endpoint is concurrency limited to a single in-flight request per customer. Overlapping requests respond with 429 (error code too_many_requests) instead of queueing.

Path parameters

subscription_idRequiredinteger

Subscription ID

item_idRequiredinteger

Subscription item ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, items, discounts, metadata)

ReturnsSubscription

Subscription object response

Error responses

400object

The subscription is not active (subscription_not_active), or the last remaining subscription item cannot be removed โ€” cancel the subscription instead (last_subscription_item).

404object

No subscription or no subscription item with this ID exists, or it belongs to another customer or subscription.

429object

Too many concurrent requests. Only one removal may be in flight per customer at a time; retry once the previous request has completed.

curl -X DELETE https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items/{item_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>'
Response
{ "id": 1, "customer_id": 1, "customer": { "id": 8435732, "first_name": "John", "last_name": "Smith", "email": "test@test.com", "marketing_consent": false, "tos_consent_at": "2022-04-01T00:00:00.000000Z", "active_subscriptions_count": 0, "external_id": "external_id", "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z" }, "referred_by": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z", "pricings": [ {} ], "plans": [ {} ], "change_product_collection_id": 1 }, "quantity": 1, "shipping_address_id": 1, "shipping_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "shipping_method_id": 1, "shipping_method": { "id": 1, "type": "shipping_option", "method": {} }, "billing_address_id": 1, "billing_address": { "id": 3486, "first_name": "John", "last_name": "Smith", "country_id": 230, "region_id": 1231, "country": "United States", "region": "California", "phone": "+13232380656", "company_name": null, "address_one": "7609 Mckinley Ave", "address_two": null, "city": "Los Angeles", "zip": "90044" }, "payment_method_id": 1, "payment_method": { "id": 567, "type": "card", "identifier": "4242", "card": { "last_four": "4242", "expiry_month": "2", "expiry_year": "2099", "type": "credit", "brand": "visa" }, "ideal": { "bank": "ING", "bic": "INGBNL2A", "email": "test@subbly.co", "name": "John Doe" }, "bancontact": { "email": "test@subbly.co", "name": "John Doe" }, "acss_debit": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "Royal Bank of Canada", "transit_number": "12345", "institution_number": "123", "last_four": "6789" }, "us_bank_account": { "email": "test@subbly.co", "name": "John Doe", "bank_name": "US Bank", "last_four": "6789", "routing_number": "123456789", "account_type": "checking", "account_holder_type": "individual" }, "sepa_debit": { "email": "test@subbly.co", "name": "John Doe", "iban_last4": "6789", "bank_code": "123456", "country": "DE", "branch_code": "12345" }, "sofort": { "email": "test@subbly.co", "name": "John Doe", "country": "DE" }, "link": { "email": "test@subbly.co", "name": "John Doe" }, "cashapp": { "email": "test@subbly.co", "name": "John Doe", "buyer_id": "cashapp:123456789", "cash_tag": "$subbly" }, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "currency_code": "USD", "survey": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "preferences": { "version": 2, "survey_id": 1, "data": [ {} ], "items_count": 1, "items": [ { "id": 1, "product_id": 1, "survey_id": 1, "data": [ {} ] } ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "gift": { "message": "message", "starts_at": "2022-02-24T04:00:00.000000Z", "order_limit": 1 }, "commitment_term_total_payments": 1, "cancel_at_end_of_commitment": true, "next_payment_date": "2023-04-23T00:45:00.000000Z", "starts_at": "2023-04-23T00:45:00.000000Z", "past_due": false, "next_shipment_at": "2023-04-23T00:45:00.000000Z", "successful_charges_count": 1, "charges_limit": 1, "status": "active", "cancel_at_period_end": true, "cancellations": [ { "id": 1, "subscription_id": 1, "reason": "reason", "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "extra_feedback": "extra_feedback", "reason_submitted_on": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "addons": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "items": [ { "id": 1, "subscription_id": 1, "product_id": 1, "product": {}, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": {}, "bundle": {}, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "actions": { "cancel": { "allowed": true }, "set_to_cancel": { "allowed": false }, "undo_set_to_cancel": { "allowed": false }, "cancellation_request": { "allowed": false }, "undo_cancellation_request": { "allowed": false }, "undo_cancellation": { "allowed": false }, "pause": { "allowed": false }, "resume": { "allowed": false }, "skip": { "allowed": false }, "prolong_skipping": { "allowed": false }, "reactivate": { "allowed": false }, "update_address": { "allowed": true }, "update_payment_method": { "allowed": true }, "add_one_time_item": { "allowed": false }, "add_subscription_item": { "allowed": true }, "change_billing_cycle": { "allowed": true } }, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "active": true, "paused": false, "paused_at": null, "skipping_until": null, "last_payment_at": "2023-04-23T00:45:00.000000Z", "unpaid": false, "cancellation_requested": false, "waiting_until": null, "cancelled_at": null, "switched_at": null, "previous_subscription_id": null, "skipping_prolonged": false, "test": false, "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update a subscription item's preferences

PATCH /subscriptions/{subscription_id}/items/{item_id}/preferences

Update the survey preferences (answers) for a single subscription item.

Path parameters

subscription_idRequiredinteger

Subscription ID

item_idRequiredinteger

Subscription item ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, bundle, bundle.items, discounts, metadata)

Request body

Update a subscription item's survey preferences

preferencesRequiredobject[] | null
update_ordersoptionalboolean

Update order preferences in the awaiting_delivery and future_shipment status. Honoured only when the sync_orders_preferences_on_subscription_update shop setting is enabled (otherwise 400 order_sync_disabled), and not allowed when the subscription uses dynamic shipping.

ReturnsSubscriptionItem

Subscription item object response

Error responses

400object

The subscription is not active (subscription_not_active), the item is a one-time item (item_not_editable), update_orders is true while the shop's order preference sync is disabled (order_sync_disabled), or a chosen answer is out of stock (out_of_stock).

404object

No subscription or no subscription item with this ID exists, or it belongs to another customer or subscription.

422object

preferences is missing (send null to clear it), is not an array, or does not match the active survey of the item's product ("The preferences are invalid"); a question lacks question_id or answers; update_orders is not a boolean, or the subscription uses dynamic shipping; or expand is not an array.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items/{item_id}/preferences \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "preferences": [ { "question_id": 1, "answers": [ { "id": 1, "content": "content", "quantity": 1 } ] } ], "update_orders": true }'
Response
{ "id": 1, "subscription_id": 1, "product_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": { "version": 2, "survey_id": 1, "data": [ {} ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Update a subscription item's bundle

PATCH /subscriptions/{subscription_id}/items/{item_id}/bundle

Deprecated. Do not use it in new integrations.

Deprecated: use POST /subscriptions/{subscription_id}/items/{item_id}/change_plan with plan_id and bundle, or POST /subscriptions/{subscription_id}/change_plans with a pick that carries bundle. This route runs as that pick for the item (plan_id = product_id when sent, else the current plan), with quantity written to the item in the same request. The target product must be a configurable bundle. Works for subscriptions with any number of subscription items.

Path parameters

subscription_idRequiredinteger

Subscription ID

item_idRequiredinteger

Subscription item ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, bundle, bundle.items, discounts, metadata)

Request body

Update a single subscription item's configurable bundle. The item's product must be a configurable bundle.

bundleRequiredSubscriptionBundleBody

Bundle payload (preferences + items) for this subscription item.

quantityoptionalinteger

Item quantity. When omitted the current quantity is kept. A value above 1 answers 422 when the shop turns off the quantity selector, and any value answers 422 for an item added by a coupon.

product_idoptionalinteger | null

Optional target plan for this item: a configurable bundle that is a sibling of the item's product or sits in its change-product collection, on the subscription's billing cycle unless the item is its only subscription item. When omitted the item keeps its current product.

ReturnsSubscriptionItem

Subscription item object response

Error responses

400object

The subscription is not active (subscription_not_active), the item is a one-time item (item_not_editable), the target product (product_id when sent, otherwise the item's product) is unknown or not a configurable bundle (bundle_not_configurable), or the bundle items and preferences do not satisfy the bundle plan (bundle_items_not_valid). The route runs as POST /subscriptions/{subscription_id}/change_plans and takes its guards as well: the subscription is paused (subscription_paused) or skipping (already_skipping), or the shop does not allow plan changes (plan_change_disabled). The write refuses the pick when it re-checks it under the lock: another subscription item is on another billing cycle (plan_change_items_left_behind, "Item 2 must also be moved to a plan with the same billing cycle.").

404object

No subscription or no subscription item with this ID exists, or it belongs to another customer or subscription.

422object

bundle is missing or lacks the items key; bundle.preferences do not fit the bundle; product_id is neither the item's current plan nor a published subscription plan that is a sibling or sits in the change-product collection ("The selected plan is not available for this item."), or is on another billing cycle while the subscription has other subscription items ("The selected plan is on another billing cycle. Move every subscription item at once with POST subscriptions/{subscription}/change_plans."); quantity is below 1, above 1 when the shop turns off the subscription quantity selector, or is sent for an item that a coupon added; or expand is not an array.

curl -X PATCH https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items/{item_id}/bundle \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "bundle": { "preferences": [ { "attribute_id": 1, "metafield_id": 1, "values": [ null ] } ], "items": [ { "product_id": 1, "quantity": 1 } ] }, "quantity": 1, "product_id": 1 }'
Response
{ "id": 1, "subscription_id": 1, "product_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": { "version": 2, "survey_id": 1, "data": [ {} ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Change the plan of a subscription item

POST /subscriptions/{subscription_id}/items/{item_id}/change_plan

Moves one subscription item to another plan: a pick of POST subscriptions/{subscription_id}/change_plans on its own route, with that route's targets (GET subscriptions/{subscription_id}/plans lists them), bundle rules and effects. The plan must share the subscription's billing cycle unless the item is its only subscription item, which may change the cycle alone (one-time items do not count); with other subscription items, move them all at once with change_plans. Read the item's actions.change_plan.

Path parameters

subscription_idRequiredinteger

Subscription ID

item_idRequiredinteger

Subscription item ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, discounts, metadata)

Request body

plan_idRequiredinteger

The plan the item moves to.

bundleoptionalobject | null

The contents for a configurable bundle plan: items (product_id, quantity) and preferences (attribute_id or metafield_id, values). Both keys are required, as on a change_plans pick. null is the same as leaving bundle out.

ReturnsSubscriptionItem

The subscription item on its new plan

Error responses

400object

The subscription is not active (subscription_not_active), paused (subscription_paused) or skipping (already_skipping), the shop does not allow plan changes (plan_change_disabled), or the item is a one-time item (item_not_subscription). The write re-checks the pick under the lock and refuses one that another write made invalid while the change waited for the subscription: the item was removed (plan_change_item_not_found), or another subscription item is on another billing cycle (plan_change_items_left_behind).

404object

No subscription or no subscription item with this ID exists, or it belongs to another customer or subscription. A request without a valid customer token runs as a guest and gets this response too.

422object

plan_id is missing, not an integer, or not a plan the item may move to ("The selected plan is not available for this item."), or is on another billing cycle while the subscription has other subscription items ("The selected plan is on another billing cycle. Move every subscription item at once with POST subscriptions/{subscription}/change_plans."); bundle is sent for a plan without a configurable bundle ("The bundle field is not accepted for this plan."), missing while the plan's bundle is not the item's current bundle ("The bundle field is required for this plan."), lacks preferences or items, or holds preferences or items the bundle does not allow; or expand is not an array.

429object

Another rate-limited request from the same customer (or from the same IP when no customer token is sent) is still in progress.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items/{item_id}/change_plan \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "plan_id": 47, "bundle": { "preferences": [ { "attribute_id": 1, "metafield_id": 1, "values": [ 1 ] } ], "items": [ { "product_id": 1, "quantity": 1 } ] } }'
Response
{ "id": 1, "subscription_id": 1, "product_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": { "version": 2, "survey_id": 1, "data": [ {} ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }

Change the variant of a one-time item

POST /subscriptions/{subscription_id}/items/{item_id}/change_variant

Moves a one-time item of the subscription to another one-time variant of the shop. The change takes effect at the next renewal; quantity and duration stay as they are (change them with PATCH subscriptions/{subscription_id}/items/{item_id}). Sending the item's current variant is a no-op. Subscription items change their plan with POST subscriptions/{subscription_id}/items/{item_id}/change_plan or POST subscriptions/{subscription_id}/change_plans.

Path parameters

subscription_idRequiredinteger

Subscription ID

item_idRequiredinteger

Subscription item ID

Query parameters

expand[]optionalstring[]

List of relations to expand (e.g. product, discounts, metadata)

Request body

variant_idRequiredinteger

The one-time variant the item moves to.

ReturnsSubscriptionItem

Subscription item object response

Error responses

400object

The subscription is not active (subscription_not_active), the shop does not allow one-time items (addons_disabled), the subscription is a membership without a shipping address and shipping method (membership_subscription), the item is a subscription item (item_not_one_time), or a coupon added the item (coupon_item_product_locked).

404object

No subscription or no subscription item with this ID exists, or it belongs to another customer or subscription.

422object

variant_id is missing, not an integer, or not a one-time variant of the shop that is published, not archived, not a gift card, a leaf and not a configurable bundle; or expand is not an array.

429object

Another rate-limited request from the same customer (or from the same IP when no customer token is sent) is still in progress.

curl -X POST https://api.subbly.co/storefront/v1/subscriptions/{subscription_id}/items/{item_id}/change_variant \ -H 'X-API-KEY: <api-key>' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "variant_id": 89 }'
Response
{ "id": 1, "subscription_id": 1, "product_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }, "duration": 1, "quantity": 1, "addon": true, "origin": "coupon", "preferences": { "version": 2, "survey_id": 1, "data": [ {} ] }, "bundle": { "preferences": [ {} ], "items": [ {} ] }, "actions": { "remove": { "allowed": true }, "change_quantity": { "allowed": false }, "change_plan": { "allowed": true } }, "discounts": [ { "id": 1, "customer_id": 1, "amount_off": 1, "percent_off": 1, "coupon_id": 1, "coupon": {}, "start": "2023-04-23T00:45:00.000000Z", "end": "2023-04-23T00:45:00.000000Z", "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" } ], "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01T00:00:00.000000Z", "updated_at": "2022-04-01T00:00:00.000000Z" }
paginationobject
dataSubscription[]
idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idRequiredinteger

Metadata ID

valuesRequiredobject[]

Array of metadata values

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

question_idRequiredinteger
answersRequiredobject[]
idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

preferencesoptionalBundlePreferenceBody[] | null

Metafield preferences. Optional on the bundle routes and POST items: an absent key is treated as an empty list. change_plans and change_plan require it.

itemsRequiredBundleItemBody[]
idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
servicestring | null

Carrier service code. Only present for dynamic shipping methods.

carrier_idinteger | null

Shipping carrier ID. Only present for dynamic shipping methods.

carrierShippingCarrier | null

Expandable link to the shipping carrier. Only present for dynamic shipping methods.

typestring

Possible values: shipping_option, local_delivery, local_pickup.

methodShippingOption | LocalDelivery | LocalPickup
shipping_feeinteger
future_shipping_feeinteger
customs_feeinteger

Customs fee for the first shipment

Defaults to 0.

future_customs_feeinteger

Customs fee for recurring shipments

Defaults to 0.

prohibited_productsinteger[]
idinteger
servicestring | null

Carrier service code. Only present for dynamic shipping methods.

carrier_idinteger | null

Shipping carrier ID. Only present for dynamic shipping methods.

carrierShippingCarrier | null

Expandable link to the shipping carrier. Only present for dynamic shipping methods.

typestring

Possible values: shipping_option, local_delivery, local_pickup.

methodShippingOption | LocalDelivery | LocalPickup
shipping_feeinteger
future_shipping_feeinteger
customs_feeinteger

Customs fee for the first shipment

Defaults to 0.

future_customs_feeinteger

Customs fee for recurring shipments

Defaults to 0.

prohibited_productsinteger[]
available_datesstring[] | null

Explicit list of selectable dates (Y-m-d). Null when range applies instead.

rangeobject | null

Inclusive date range of selectable dates. Null when available_dates applies instead.

available_datesstring[] | null

Explicit list of selectable dates (Y-m-d). Null when range applies instead.

rangeobject | null

Inclusive date range of selectable dates. Null when available_dates applies instead.

available_datesstring[] | null

Explicit list of selectable dates (Y-m-d). Null when range applies instead.

rangeobject | null

Inclusive date range of selectable dates. Null when available_dates applies instead.

idRequiredinteger

A subscription item of this subscription (not a one-time item), named at most once.

plan_idRequiredinteger

The plan the item moves to.

bundleoptionalobject | null

The contents for a configurable bundle plan: items (product_id, quantity) and preferences (attribute_id or metafield_id, values). Unlike the other bundle routes, both keys are required here: an absent preferences is not treated as an empty list. null is the same as leaving bundle out.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

current_billing_cycleSubscriptionBillingCycle

The subscription's billing cycle and, per subscription item, its other plans on it.

available_billing_cyclesSubscriptionBillingCycle[]

The other billing cycles every subscription item can reach, shortest period first.

preferencesoptionalBundlePreferenceBody[] | null

Metafield preferences. Optional on the bundle routes and POST items: an absent key is treated as an empty list. change_plans and change_plan require it.

itemsRequiredBundleItemBody[]
idRequiredinteger

Metadata ID

valuesRequiredobject[]

Array of metadata values

idinteger
subscription_idinteger
product_idinteger
productVariant | null

Expandable link to the variant.

durationinteger | null

Possible values: 1.

quantityinteger
addonboolean

Whether this item is a one-time add-on (true) rather than a recurring subscription item (false).

originstring | null

What put the item on the subscription: coupon for an item gifted by a coupon; pre_purchase, mid_purchase or post_purchase for an item accepted from a funnel offer at that checkout step; null for an item added directly.

Possible values: coupon, pre_purchase, mid_purchase, post_purchase.

preferencesSubscriptionItemPreferences

Survey preferences snapshot for a single subscription item.

bundleSubscriptionBundle | null

Bundle configuration for this item. null for one-time add-on items.

actionsobject

The customer actions on this item, one entry per button the storefront renders on the row. Always present. Same value shape as the subscription's actions.

  • remove: DELETE items/{item_id}
  • change_quantity: PATCH items/{item_id} with quantity, for subscription items only: always false on a one-time item, whose quantity is changed with the same PATCH directly. Also reflects the shop's quantity selector, which the endpoint does not enforce: with the selector off, the endpoint drops a quantity above 1 instead of answering 400.
  • change_plan (subscription items only): POST items/{item_id}/change_plan, or POST change_plans with a pick for this item; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and the item has another plan: on the current cycle, of its product or its change collection (GET plans current_billing_cycle.items[].plans), or on any cycle when it is the subscription's only subscription item
  • change_variant (one-time items only): POST items/{item_id}/change_variant; true when the subscription is active, the shop allows one-time items, the subscription is not a membership without a shipping address and shipping method, and a coupon did not add the item
discountsDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
subscription_idinteger
product_idinteger
productVariant | null

Expandable link to the variant.

durationinteger | null

Possible values: 1.

quantityinteger
addonboolean

Whether this item is a one-time add-on (true) rather than a recurring subscription item (false).

originstring | null

What put the item on the subscription: coupon for an item gifted by a coupon; pre_purchase, mid_purchase or post_purchase for an item accepted from a funnel offer at that checkout step; null for an item added directly.

Possible values: coupon, pre_purchase, mid_purchase, post_purchase.

preferencesSubscriptionItemPreferences

Survey preferences snapshot for a single subscription item.

bundleSubscriptionBundle | null

Bundle configuration for this item. null for one-time add-on items.

actionsobject

The customer actions on this item, one entry per button the storefront renders on the row. Always present. Same value shape as the subscription's actions.

  • remove: DELETE items/{item_id}
  • change_quantity: PATCH items/{item_id} with quantity, for subscription items only: always false on a one-time item, whose quantity is changed with the same PATCH directly. Also reflects the shop's quantity selector, which the endpoint does not enforce: with the selector off, the endpoint drops a quantity above 1 instead of answering 400.
  • change_plan (subscription items only): POST items/{item_id}/change_plan, or POST change_plans with a pick for this item; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and the item has another plan: on the current cycle, of its product or its change collection (GET plans current_billing_cycle.items[].plans), or on any cycle when it is the subscription's only subscription item
  • change_variant (one-time items only): POST items/{item_id}/change_variant; true when the subscription is active, the shop allows one-time items, the subscription is not a membership without a shipping address and shipping method, and a coupon did not add the item
discountsDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idRequiredinteger

Metadata ID

valuesRequiredobject[]

Array of metadata values

idinteger
subscription_idinteger
product_idinteger
productVariant | null

Expandable link to the variant.

durationinteger | null

Possible values: 1.

quantityinteger
addonboolean

Whether this item is a one-time add-on (true) rather than a recurring subscription item (false).

originstring | null

What put the item on the subscription: coupon for an item gifted by a coupon; pre_purchase, mid_purchase or post_purchase for an item accepted from a funnel offer at that checkout step; null for an item added directly.

Possible values: coupon, pre_purchase, mid_purchase, post_purchase.

preferencesSubscriptionItemPreferences

Survey preferences snapshot for a single subscription item.

bundleSubscriptionBundle | null

Bundle configuration for this item. null for one-time add-on items.

actionsobject

The customer actions on this item, one entry per button the storefront renders on the row. Always present. Same value shape as the subscription's actions.

  • remove: DELETE items/{item_id}
  • change_quantity: PATCH items/{item_id} with quantity, for subscription items only: always false on a one-time item, whose quantity is changed with the same PATCH directly. Also reflects the shop's quantity selector, which the endpoint does not enforce: with the selector off, the endpoint drops a quantity above 1 instead of answering 400.
  • change_plan (subscription items only): POST items/{item_id}/change_plan, or POST change_plans with a pick for this item; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and the item has another plan: on the current cycle, of its product or its change collection (GET plans current_billing_cycle.items[].plans), or on any cycle when it is the subscription's only subscription item
  • change_variant (one-time items only): POST items/{item_id}/change_variant; true when the subscription is active, the shop allows one-time items, the subscription is not a membership without a shipping address and shipping method, and a coupon did not add the item
discountsDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
customer_idinteger
customerCustomer | null

Expandable link to the customer. null unless expand[]=customer.

referred_byinteger | null
product_idinteger

The plan of the subscription's first (lowest-id) subscription item; one-time items never count. change_plans, items/{item_id}/change_plan (and the deprecated routes that run as them) and removing an item set it again. Each item's own plan is its product_id on items[].

productSubscriptionProduct | null

Expandable link to the product

quantityinteger | nullDeprecated

Deprecated. null for subscriptions with multiple subscription items. Use the per-item quantity on items[].

shipping_address_idinteger
shipping_addressAddress | PickupInfo | null

Expandable link to the shipping address or pickup point object. null unless expand[]=shipping_address. Deleted addresses are still returned.

shipping_method_idinteger
shipping_methodShippingMethod | null

Expandable link to the shipping method. null unless expand[]=shipping_method.

billing_address_idinteger
billing_addressAddress | null

Expandable link to the billing address. null unless expand[]=billing_address. Deleted addresses are still returned.

payment_method_idinteger
payment_methodPaymentMethod | null

Expandable link to the payment method. null unless expand[]=payment_method. Deleted payment methods are still returned.

currency_codestring
surveySubscriptionPreferencesDeprecated

Deprecated. Alias of preferences.

preferencesSubscriptionPreferences

Subscription survey preferences envelope. For subscriptions with multiple subscription items, items holds the per-item preferences and is authoritative; the top-level survey_id and data reflect the primary (first) subscription item only.

bundleSubscriptionBundleDeprecated

Deprecated. Empty for subscriptions with multiple subscription items. Use the per-item bundle on items[].

giftobject | null
commitment_term_total_paymentsinteger | null
cancel_at_end_of_commitmentboolean
next_payment_datestring

Format: date-time.

starts_atstring | null

Subscription start date, set when the customer chose a future start.

Format: date-time.

past_dueboolean
next_shipment_atstring | null

Format: date-time.

successful_charges_countinteger

Number of successful charges.

charges_limitinteger | null
statusstring

The current status of the subscription. Possible values:

  • active: The subscription is currently active, and the user is being billed as per the plan's terms
  • trial: The subscription is in a trial period, and will automatically switch to an active status with billing at the start of the next renewal cycle
  • pre_order: The subscription has been created but will only be charged once the pre-order end date is reached
  • gift_waiting_to_start: A subscription that was gifted and is set to begin at a future date
  • cancelled: The subscription has been canceled and will not renew at the end of the current billing period
  • switched: The subscription has been switched to a different plan with purpose to reset subscription's order count
  • expired: The subscription has ended due to reaching its auto expire cycles

Possible values: active, trial, pre_order, gift_waiting_to_start, cancelled, switched, expired.

cancel_at_period_endboolean

Whether the subscription is set to cancel at the end of the current billing period.

cancellationsCancellation[]
discountsDiscount[]
addonsSubscriptionItem[]Deprecated

Deprecated. Contains only the one-time items (legacy add-ons). Use items for the full list.

itemsSubscriptionItem[]

The subscription's items โ€” recurring subscription items and any one-time add-on items.

actionsobject

The customer actions on this subscription, one entry per button the storefront renders. Always present. allowed means the subscription's state and the shop's configuration permit the call now; the endpoint still validates the request body (a chosen date, an address, a payment method, a cancellation type). Each entry is an object so that a reason (the failing guard's error code) can be added in a later version; reason is reserved and not answered yet. The keys are named after the buttons, not the routes:

  • cancel: POST cancel without type on a subscription that is not committed (cancels immediately)
  • set_to_cancel: the same untyped POST cancel on a committed subscription (cancels at the end of the commitment term); at most one of cancel and set_to_cancel is true
  • undo_set_to_cancel: POST undo_set_to_cancel
  • cancellation_request: POST cancellation_request
  • undo_cancellation_request: POST undo_cancellation_request
  • undo_cancellation: DELETE undo_cancellation
  • pause: POST pause
  • resume: POST resume
  • skip: POST skip
  • prolong_skipping: POST prolong_skipping
  • reactivate: POST reactivate
  • update_address: PATCH address
  • update_payment_method: PATCH payment_method
  • add_one_time_item: POST items with type: one_time
  • add_subscription_item: POST items with type: subscription; does not reflect the shop plan's multiple_subscription_products feature, so the call can still answer 400 feature_not_available
  • change_billing_cycle: POST change_plans naming every subscription item on another cycle; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and GET plans lists at least one cycle in available_billing_cycles
metadataEntityMetadata[] | null
activeboolean

Whether the subscription is live. false once it has been cancelled, has expired or was switched to another subscription.

pausedboolean

Whether the subscription is paused.

paused_atstring | null

When the subscription was paused. null when it is not paused.

Format: date-time.

skipping_untilstring | null

Renewals are skipped until this date. A future value means a skip is running.

Format: date-time.

last_payment_atstring

Format: date-time.

unpaidboolean
cancellation_requestedboolean
waiting_untilstring | null

The subscription waits to start until this date. A future value means it has not started yet.

Format: date-time.

cancelled_atstring | null

When the subscription was cancelled.

Format: date-time.

switched_atstring | null

When the subscription was switched to another subscription.

Format: date-time.

previous_subscription_idinteger | null

The subscription this one replaced when the customer switched.

skipping_prolongedboolean

Whether the current skip was prolonged (a further skip applied on top of an existing one). Cleared when the subscription is skipped afresh, paused, resumed, reactivated, cancelled or switched, but not when a skip simply runs out, so it can stay true after skipping_until has passed. Read it together with skipping_until, or use actions.prolong_skipping.

testboolean

Whether the subscription was created in test mode.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

question_idRequiredinteger
answersRequiredobject[]
idinteger
subscription_idinteger
product_idinteger
productVariant | null

Expandable link to the variant.

durationinteger | null

Possible values: 1.

quantityinteger
addonboolean

Whether this item is a one-time add-on (true) rather than a recurring subscription item (false).

originstring | null

What put the item on the subscription: coupon for an item gifted by a coupon; pre_purchase, mid_purchase or post_purchase for an item accepted from a funnel offer at that checkout step; null for an item added directly.

Possible values: coupon, pre_purchase, mid_purchase, post_purchase.

preferencesSubscriptionItemPreferences

Survey preferences snapshot for a single subscription item.

bundleSubscriptionBundle | null

Bundle configuration for this item. null for one-time add-on items.

actionsobject

The customer actions on this item, one entry per button the storefront renders on the row. Always present. Same value shape as the subscription's actions.

  • remove: DELETE items/{item_id}
  • change_quantity: PATCH items/{item_id} with quantity, for subscription items only: always false on a one-time item, whose quantity is changed with the same PATCH directly. Also reflects the shop's quantity selector, which the endpoint does not enforce: with the selector off, the endpoint drops a quantity above 1 instead of answering 400.
  • change_plan (subscription items only): POST items/{item_id}/change_plan, or POST change_plans with a pick for this item; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and the item has another plan: on the current cycle, of its product or its change collection (GET plans current_billing_cycle.items[].plans), or on any cycle when it is the subscription's only subscription item
  • change_variant (one-time items only): POST items/{item_id}/change_variant; true when the subscription is active, the shop allows one-time items, the subscription is not a membership without a shipping address and shipping method, and a coupon did not add the item
discountsDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

preferencesoptionalBundlePreferenceBody[] | null

Metafield preferences. Optional on the bundle routes and POST items: an absent key is treated as an empty list. change_plans and change_plan require it.

itemsRequiredBundleItemBody[]
idinteger
subscription_idinteger
product_idinteger
productVariant | null

Expandable link to the variant.

durationinteger | null

Possible values: 1.

quantityinteger
addonboolean

Whether this item is a one-time add-on (true) rather than a recurring subscription item (false).

originstring | null

What put the item on the subscription: coupon for an item gifted by a coupon; pre_purchase, mid_purchase or post_purchase for an item accepted from a funnel offer at that checkout step; null for an item added directly.

Possible values: coupon, pre_purchase, mid_purchase, post_purchase.

preferencesSubscriptionItemPreferences

Survey preferences snapshot for a single subscription item.

bundleSubscriptionBundle | null

Bundle configuration for this item. null for one-time add-on items.

actionsobject

The customer actions on this item, one entry per button the storefront renders on the row. Always present. Same value shape as the subscription's actions.

  • remove: DELETE items/{item_id}
  • change_quantity: PATCH items/{item_id} with quantity, for subscription items only: always false on a one-time item, whose quantity is changed with the same PATCH directly. Also reflects the shop's quantity selector, which the endpoint does not enforce: with the selector off, the endpoint drops a quantity above 1 instead of answering 400.
  • change_plan (subscription items only): POST items/{item_id}/change_plan, or POST change_plans with a pick for this item; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and the item has another plan: on the current cycle, of its product or its change collection (GET plans current_billing_cycle.items[].plans), or on any cycle when it is the subscription's only subscription item
  • change_variant (one-time items only): POST items/{item_id}/change_variant; true when the subscription is active, the shop allows one-time items, the subscription is not a membership without a shipping address and shipping method, and a coupon did not add the item
discountsDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

preferencesRequiredBundlePreferenceBody[] | null

Metafield preferences. Optional on the bundle routes and POST items: an absent key is treated as an empty list. change_plans and change_plan require it.

itemsRequiredBundleItemBody[]
idinteger
subscription_idinteger
product_idinteger
productVariant | null

Expandable link to the variant.

durationinteger | null

Possible values: 1.

quantityinteger
addonboolean

Whether this item is a one-time add-on (true) rather than a recurring subscription item (false).

originstring | null

What put the item on the subscription: coupon for an item gifted by a coupon; pre_purchase, mid_purchase or post_purchase for an item accepted from a funnel offer at that checkout step; null for an item added directly.

Possible values: coupon, pre_purchase, mid_purchase, post_purchase.

preferencesSubscriptionItemPreferences

Survey preferences snapshot for a single subscription item.

bundleSubscriptionBundle | null

Bundle configuration for this item. null for one-time add-on items.

actionsobject

The customer actions on this item, one entry per button the storefront renders on the row. Always present. Same value shape as the subscription's actions.

  • remove: DELETE items/{item_id}
  • change_quantity: PATCH items/{item_id} with quantity, for subscription items only: always false on a one-time item, whose quantity is changed with the same PATCH directly. Also reflects the shop's quantity selector, which the endpoint does not enforce: with the selector off, the endpoint drops a quantity above 1 instead of answering 400.
  • change_plan (subscription items only): POST items/{item_id}/change_plan, or POST change_plans with a pick for this item; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and the item has another plan: on the current cycle, of its product or its change collection (GET plans current_billing_cycle.items[].plans), or on any cycle when it is the subscription's only subscription item
  • change_variant (one-time items only): POST items/{item_id}/change_variant; true when the subscription is active, the shop allows one-time items, the subscription is not a membership without a shipping address and shipping method, and a coupon did not add the item
discountsDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
subscription_idinteger
product_idinteger
productVariant | null

Expandable link to the variant.

durationinteger | null

Possible values: 1.

quantityinteger
addonboolean

Whether this item is a one-time add-on (true) rather than a recurring subscription item (false).

originstring | null

What put the item on the subscription: coupon for an item gifted by a coupon; pre_purchase, mid_purchase or post_purchase for an item accepted from a funnel offer at that checkout step; null for an item added directly.

Possible values: coupon, pre_purchase, mid_purchase, post_purchase.

preferencesSubscriptionItemPreferences

Survey preferences snapshot for a single subscription item.

bundleSubscriptionBundle | null

Bundle configuration for this item. null for one-time add-on items.

actionsobject

The customer actions on this item, one entry per button the storefront renders on the row. Always present. Same value shape as the subscription's actions.

  • remove: DELETE items/{item_id}
  • change_quantity: PATCH items/{item_id} with quantity, for subscription items only: always false on a one-time item, whose quantity is changed with the same PATCH directly. Also reflects the shop's quantity selector, which the endpoint does not enforce: with the selector off, the endpoint drops a quantity above 1 instead of answering 400.
  • change_plan (subscription items only): POST items/{item_id}/change_plan, or POST change_plans with a pick for this item; true only when the shop allows plan changes, the subscription is active, not paused and not skipping, and the item has another plan: on the current cycle, of its product or its change collection (GET plans current_billing_cycle.items[].plans), or on any cycle when it is the subscription's only subscription item
  • change_variant (one-time items only): POST items/{item_id}/change_variant; true when the subscription is active, the shop allows one-time items, the subscription is not a membership without a shipping address and shipping method, and a coupon did not add the item
discountsDiscount[]
metadataEntityMetadata[] | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.