Skip to main content
POST
/
products
/
{productId}
/
subscription_method
Create or update subscription method
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"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

productId
integer<int64>
required

Body

application/json
status
enum<string>
Available options:
enabled,
disabled
optionsAttributes
object[]

Response

The updated subscription method

id
integer<int64>
required
status
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
options
object[]
required