Tamio

Create a recurring invoice

POST https://api.tamio.com/v2/orders/recurring/create

Creates a recurring subscription invoice with flexible billing cycles, trial periods, and automated payment collection. Supports weekly, monthly, yearly, and daily intervals.

The interval field maximum depends on the billing_cycle value:

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

Body Parameters

customer object*
JSON
{ "customer": { "id": "00000000-0000-0000-0000-000000000000", "billing_address_id": "00000000-0000-0000-0000-000000000000", "shipping_address_id": "00000000-0000-0000-0000-000000000000" } }
id string*

Customer UUID

billing_address_id string
shipping_address_id string
date object*

Subscription start date (ISO format or Unix timestamp)

due_date object

Payment due date for each generated invoice

label string

Invoice label/title

locale string

Language code for localization

currency string*

Three-letter ISO currency code

recurring boolean*

Must be true for recurring invoices

taxes string
accountoff
statement_descriptor string

Text on customer's bank/card statement

send_to_customer boolean

Send each invoice to customer via email

trial_period integer

Trial period in days before first charge

billing_cycle string*

Billing frequency unit

dayweekmonthyear
interval integer*

Number of billing_cycle units between charges

payments array of string*

Payment method IDs (required for recurring)

appendix string

Additional text/notes appended to each invoice

fulfillment_options FulfillmentOptions
products array of object*

Single product for recurring billing

JSON
{ "products": [ { "name": "string", "price": 0, "quantity": 0 } ] }
name string*

Product/service name

price integer*

Price per unit per billing cycle in smallest currency unit

quantity integer

Quantity to bill each cycle

Responses

200 Recurring invoice created successfully

Recurring invoice created successfully

status integer
transaction object

Transaction object with subscription details

400 Bad request – validation or business-logic error
401 Missing or invalid API key
/orders/recurring/create
1const response = await fetch("https://api.tamio.com/v2/orders/recurring/create", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 "customer": {
9 "id": "00000000-0000-0000-0000-000000000000",
10 "billing_address_id": "00000000-0000-0000-0000-000000000000",
11 "shipping_address_id": "00000000-0000-0000-0000-000000000000"
12 },
13 "date": null,
14 "due_date": null,
15 "label": "string",
16 "locale": "string",
17 "currency": "string",
18 "recurring": false,
19 "taxes": "account",
20 "statement_descriptor": "string",
21 "send_to_customer": false,
22 "trial_period": 0,
23 "billing_cycle": "day",
24 "interval": 0,
25 "payments": [],
26 "appendix": "string",
27 "fulfillment_options": {
28 "stock": false,
29 "accounting_systems": false,
30 "merchant_emails": false,
31 "customer_emails": false,
32 "automations": false,
33 "shipping_providers": false
34 },
35 "products": [
36 {
37 "name": "string",
38 "price": 0,
39 "quantity": 0
40 }
41 ]
42 })
43});
44const data = await response.json();
Responses
{
  "status": 200,
  "transaction": {}
}