Create a billing plan

POST https://api.tamio.com/v2/agency/plans/create

Creates a new agency billing plan with pricing models, quotas, permissions, and overages configuration. At least one pricing model with currency, price, billing cycle, interval, and transaction fees is required.

Note: At least one of price, transaction_fees, or transaction_fees_cents must be greater than zero in each pricing model.

Body Parameters

tax_category string*

Tax category (always "Agency Billing Plan")

Agency Billing Plan
pricing_model array of object*

Pricing configurations for different currencies and billing cycles

buyable boolean
shown boolean
on_sale boolean
discount_allowed boolean
unlimited_stock boolean
trial_period integer

Trial period in days

retries integer

Payment retry attempts for failed charges

cancel_action string
cancelpause
cancel_behaviour string
immediateend_of_period
descriptor string

Statement descriptor for credit card statements

languages object

Multilingual content keyed by language code

quotas object

Resource quotas for clients on this plan

permissions object

Feature permissions for clients on this plan

overages object

Overage pricing when quotas are exceeded

Responses

200 Billing plan created successfully

Billing plan created successfully

status integer
product Product
400 Validation error
401 Unauthorized – invalid or missing Bearer token
/agency/plans/create
1const response = await fetch("https://api.tamio.com/v2/agency/plans/create", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "product": {
    "id": "string",
    "object": "product",
    "name": "Starter Plan",
    "type": "agency_plan",
    "price": 2999,
    "currency": "EUR",
    "buyable": true,
    "shown": true,
    "on_sale": true,
    "discount_allowed": true,
    "unlimited_stock": false,
    "trial_period": 14,
    "created_at": 1700000000
  }
}