curl --request POST \
--url https://app.supercycle.com/api/v1/products/{productId}/subscription_method/options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "1.month",
"minimumTerm": "1.month",
"variantApplicationType": "all",
"marketApplicationType": "all",
"conditionApplicationType": "all",
"_destroy": true
}
'{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "1.month",
"minimumTerm": "1.month",
"depositVariantShopifyId": 123,
"variantApplicationType": "all",
"marketApplicationType": "all",
"conditionApplicationType": "all",
"variantApplicationShopifyIds": [
123
],
"marketApplicationShopifyIds": [
123
],
"conditionApplicationIds": [
123
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Creates an option for a product’s subscription method. If the method does not exist, it is created first.
curl --request POST \
--url https://app.supercycle.com/api/v1/products/{productId}/subscription_method/options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "1.month",
"minimumTerm": "1.month",
"variantApplicationType": "all",
"marketApplicationType": "all",
"conditionApplicationType": "all",
"_destroy": true
}
'{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "1.month",
"minimumTerm": "1.month",
"depositVariantShopifyId": 123,
"variantApplicationType": "all",
"marketApplicationType": "all",
"conditionApplicationType": "all",
"variantApplicationShopifyIds": [
123
],
"marketApplicationShopifyIds": [
123
],
"conditionApplicationIds": [
123
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Shopify product ID
ID of an existing option to update. Omit when creating a new option.
Recurring price in cents.
Initial checkout price in cents. Can differ from recurringPriceCents for introductory pricing.
Billing interval in N.unit format. Valid units: second, minute, hour, day, week, month, year.
^\d+\.(second|minute|hour|day|week|month|year)$"1.month"
Minimum rental term in N.unit format. Valid units: second, minute, hour, day, week, month, year.
^\d+\.(second|minute|hour|day|week|month|year)$"1.month"
Whether this option applies to all variants or only a specific subset. Defaults to 'all'.
all, some Whether this option applies to all markets or only a specific subset. Defaults to 'all'.
all, some Whether this option applies to all item conditions or only a specific subset. Defaults to 'all'.
all, some When true and id is provided, deletes this option from the subscription method.
The created subscription method option
Recurring price in cents.
Initial checkout price in cents. Can differ from recurringPriceCents for introductory pricing.
Billing interval in N.unit format. Valid units: second, minute, hour, day, week, month, year.
^\d+\.(second|minute|hour|day|week|month|year)$"1.month"
Minimum rental term in N.unit format. Valid units: second, minute, hour, day, week, month, year.
^\d+\.(second|minute|hour|day|week|month|year)$"1.month"
Shopify variant ID of the deposit product variant associated with this option, if any.
Whether this option applies to all variants or only those listed in variantApplicationShopifyIds.
all, some Whether this option applies to all markets or only those listed in marketApplicationShopifyIds.
all, some Whether this option applies to all item conditions or only those listed in conditionApplicationIds.
all, some Shopify variant IDs this option applies to. Only relevant when variantApplicationType is 'some'.
Shopify market IDs this option applies to. Only relevant when marketApplicationType is 'some'.
Internal Supercycle condition IDs this option applies to. Only relevant when conditionApplicationType is 'some'.
Was this page helpful?