Create an instalment plan

POST https://api.tamio.com/v2/instalments/create

Creates a new instalment plan with the specified payment schedule and terms.

The interval field maximum depends on the cycle value:

  • day → max interval 365
  • week → max interval 52
  • month → max interval 12
  • year → max interval 1

Body Parameters

label string*

Display name for the instalment plan

interval integer*

Number of cycle units between payments (e.g., 2 weeks, 3 months). Maximum depends on the cycle value: day=365, week=52, month=12, year=1.

instalments integer*

Total number of instalment payments

cycle string*

Time unit for payment intervals

dayweekmonthyear
upfront number

Percentage of total amount to pay upfront (0-90%)

interest number

Interest rate percentage applied to instalments (0-100%)

countries array of string

Array of country codes where this instalment plan is available

active boolean

Whether the instalment plan is active

Responses

200 Instalment plan created successfully

Instalment plan created successfully

status integer
instalment_plan InstalmentPlan
400 Bad request. Possible `error_code` values:
401 Missing or invalid API key
/instalments/create
1const response = await fetch("https://api.tamio.com/v2/instalments/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,
  "instalment_plan": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "object": "instalment_plan",
    "label": "Monthly 3x Plan",
    "interval": 1,
    "billing_cycle": "month",
    "upfront": 10,
    "interest": 5,
    "instalments": 3,
    "countries": [
      "de",
      "fr",
      "us"
    ],
    "sales": 15,
    "active": true,
    "created_at": 1700000000
  }
}