Tamio

Update a recurring invoice

POST https://api.tamio.com/v2/orders/recurring/update/{uuid}

Updates an existing recurring invoice subscription with new billing cycles, products, customer details, and subscription settings.

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

Path Parameters

uuid string*

UUID of the recurring invoice subscription to update

Body Parameters

customer object*

Customer information for the recurring subscription

JSON
{ "customer": { "id": "123e4567-e89b-12d3-a456-426614174000", "billing_address_id": "223e4567-e89b-12d3-a456-426614174001", "shipping_address_id": "323e4567-e89b-12d3-a456-426614174002" } }
id string*

Customer UUID

billing_address_id string

Billing address UUID (uses default if omitted)

shipping_address_id string

Shipping address UUID (uses default if omitted)

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

Tax calculation method

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)

products array of object*

Single product for recurring billing

JSON
{ "products": [ { "name": "Premium Plan", "price": 4900, "quantity": 1 } ] }
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 updated successfully

Recurring invoice updated successfully

status integer
transaction object

Updated transaction object

400 Validation or business-logic error.
401 Missing or invalid API key
/orders/recurring/update/{uuid}
1const response = await fetch("https://api.tamio.com/v2/orders/recurring/update/{uuid}", {
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": "123e4567-e89b-12d3-a456-426614174000",
10 "billing_address_id": "223e4567-e89b-12d3-a456-426614174001",
11 "shipping_address_id": "323e4567-e89b-12d3-a456-426614174002"
12 },
13 "date": "2024-01-01T00:00:00Z",
14 "due_date": "2024-01-05T00:00:00Z",
15 "label": "Monthly Subscription",
16 "locale": "en",
17 "currency": "USD",
18 "recurring": true,
19 "taxes": "account",
20 "statement_descriptor": "Company Services",
21 "send_to_customer": true,
22 "trial_period": 14,
23 "billing_cycle": "month",
24 "interval": 1,
25 "payments": [
26 "stripe_123"
27 ],
28 "products": [
29 {
30 "name": "Premium Plan",
31 "price": 4900,
32 "quantity": 1
33 }
34 ]
35 })
36});
37const data = await response.json();
Responses
{
  "status": 200,
  "transaction": {}
}