You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.
The ID of the product to create a subscription plan for.
(To be created with `payments/create-product`)
string
name
required
Name of the subscription plan
string
interval
required
Frequency of the interval at which the customer is charged.
Possible values:
- `day`
- `week`
- `month`
- `year`
enum
dayweekmonthyear
price
required
Amount charged each `interval` cycle.
number
currency
required
Three-letter currency code in which `price` is specified, in ISO 4217 format.
string
Example
Copied!
Result (object)
planId
required
ID of the plan.
string
state
required
State of the plan.
Possible values:
- `created` - The plan was just created. It may not be possible to accept new subscriptions yet.
- `active` - The plan is active and accepting new subscriptions.
- `inactive` - The plan has been deactivated, and cannot accept new subscriptions.