Create an invoice

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

Creates a new one-time invoice with customer details, products, and payment configuration. Requires either payment method IDs or custom payment instructions.

Products can reference existing catalog products by id, product variants by variant, or be custom line items with name and price.

Body Parameters

customer object*
date object*

Invoice creation date (ISO format or Unix timestamp)

due_date object

Payment due date (ISO format or Unix timestamp)

label string

Invoice label/title

locale string

Language code for localization

currency string*

Three-letter ISO currency code

taxes string

Tax calculation method

accountoff
prefix string

Invoice number prefix (e.g., 'INV-')

invoice_number integer

Custom invoice number (auto-generated if omitted)

send_to_customer boolean

Send invoice to customer via email after creation

custom_payment string

Custom payment instructions (required when no payment methods)

payments array of string

Payment method IDs enabled for this invoice

fulfillment_options FulfillmentOptions
shipping object

Shipping information and cost

products array of InvoiceProduct*

Products or services to invoice

Responses

200 Invoice created successfully

Invoice created successfully

status integer
transaction object

Transaction object with invoice details

invoice string

UUID of the created invoice

400 Bad request. Possible `error_code` values:
401 Missing or invalid API key
/orders/create
1const response = await fetch("https://api.tamio.com/v2/orders/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,
  "transaction": {},
  "invoice": "string"
}