curl --request POST \
--url https://app.supercycle.com/api/v1/products/{productId}/subscription_method \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "enabled",
"optionsAttributes": [
{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "<string>",
"minimumTerm": "<string>",
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"_destroy": true
}
]
}
'{
"id": 123,
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"options": [
{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "<string>",
"minimumTerm": "<string>",
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Creates or updates a subscription method for a product.
curl --request POST \
--url https://app.supercycle.com/api/v1/products/{productId}/subscription_method \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "enabled",
"optionsAttributes": [
{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "<string>",
"minimumTerm": "<string>",
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"_destroy": true
}
]
}
'{
"id": 123,
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"options": [
{
"id": 123,
"name": "<string>",
"recurringPriceCents": 123,
"checkoutPriceCents": 123,
"billingInterval": "<string>",
"minimumTerm": "<string>",
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"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.
Was this page helpful?