Create a billing plan
POST
https://api.tamio.com/v2/products/create/billing-plan
Creates a recurring subscription product with configurable billing cycles, trial periods, retry logic, and cancellation behaviour.
Body Parameters
tax_category
string*
Tax category classification UUID for the product
languages
LanguageContent*
pricing_model
array of object*
JSON
{
"pricing_model": [
{
"currency": "EUR",
"price": 1000,
"billing_cycle": "month",
"interval": 1
}
]
}
currency
string*
Currency code
price
integer*
Price per billing cycle in smallest currency unit
billing_cycle
string*
Billing cycle unit (day, week, month, year)
dayweekmonthyear
interval
integer*
Interval of billing cycles
trial_period
integer
retries
integer
cancel_action
string
cancelpause
cancel_behaviour
string
immediateend_of_period
charge_shipping_during_trial
boolean
descriptor
string
stock
integer
Billing plan stock (subscriptions available)
unlimited_stock
boolean
Whether subscriptions are unlimited
stock_limit_warning
integer
Stock threshold for low-stock warning
on_sale
boolean
Whether the plan is marked as on sale
buyable
boolean
Whether the plan can be subscribed to
shown
boolean
Whether the plan is visible in the storefront
discount_allowed
boolean
Whether discount codes can be applied
reviews_allowed
boolean
Whether customer reviews are enabled
exclude_from_feed
boolean
Whether to exclude from product feeds
hide_if_no_stock
boolean
allow_negative_stock
boolean
whitelist
array of string
google_category
integer
release_date
string
expiry_date
string
new_from
string
new_to
string
related_products
array of string
gallery
array of string
custom_fields
array of CustomFieldInput
JSON
{
"custom_fields": [
{
"language": "string",
"name": "string",
"type": "dropdown",
"required": false,
"values": [],
"range_from": "string",
"range_to": "string"
}
]
}
language
string*
name
string*
type
string*
dropdownradio-buttonscheckboxestextfieldtextareadate-picker
required
boolean*
values
array of string
range_from
string
range_to
string
custom_attributes
array of CustomAttributeValue
JSON
{
"custom_attributes": [
{
"id": "00000000-0000-0000-0000-000000000000",
"values": {
"text": {},
"link": {},
"image": "00000000-0000-0000-0000-000000000000"
}
}
]
}
id
string*
values
object*
JSON
{
"values": {
"text": {},
"link": {},
"image": "00000000-0000-0000-0000-000000000000"
}
}
text
object
link
object
image
string
min_units
integer
max_units
integer
Responses
200
Product operation successful
Product operation successful
status
integer
product
Product
400
Bad request. Possible `error_code` values:
Bad request. Possible error_code values:
| Code | Description |
|---|---|
1002 | Referenced resource not found (gallery image, related product, variation asset, etc.) |
10060 | Product quota exceeded for your plan |
10065 | Invalid product tax category for the given product type |
10066 | Stock is required (provide stock, unlimited_stock, or stock_breakdown) |
10067 | Minimum units cannot exceed maximum units |
10070 | Variation option languages do not match product languages |
10072 | Variation options must contain all configured languages |
10073 | Variation options must contain all option values |
10074 | A variation option value was not found |
10075 | Variation option value languages are inconsistent |
10076 | Variation pricing is invalid (must match product currencies) |
10078 | Variation stock is invalid |
10079 | Some variations have warehouse stock but not all |
10298 | Subscription payment methods are not activated |
10320 | Invalid client ID for billing plan restriction |
10361 | Custom field checkbox values are invalid |
10362 | Custom field date range is invalid (end must be after start) |
10363 | Custom fields configuration is invalid |
10364 | Custom attributes are invalid |
10365 | One or more digital files not found |
10366 | Stock breakdown format is invalid |
10367 | One or more warehouses not found |
status
integer
error
string
error_code
integer
401
Missing or invalid API key
Missing or invalid API key
status
integer
error
string