Skip to main content
POST
/
api
/
v1
/
invoices
Create Invoice
curl --request POST \
  --url https://api.example.com/api/v1/invoices \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": "<string>",
  "currency": "<string>",
  "due_date": "<string>",
  "line_items": [
    {}
  ],
  "subscription_id": "<string>"
}
'
{
  "id": "...",
  "invoice_number": "INV-2025-0055",
  "status": "DRAFT",
  "currency": "USD",
  "subtotal": 500.00,
  "tax": 90.00,
  "total": 590.00,
  "amount_due": 590.00,
  "line_items": [
    {
      "description": "Setup fee",
      "quantity": 1,
      "unit_amount": 500.00,
      "line_total": 500.00
    }
  ]
}
customer_id
string
required
UUID of the customer
currency
string
required
ISO 4217 currency code
due_date
string
required
ISO 8601 payment due date
line_items
array
required
Array of line items. Each item requires:
  • description (string)
  • quantity (number)
  • unit_amount (number)
subscription_id
string
Optional: link to a subscription
Customer must have billing_address_country set for tax calculation.
{
  "id": "...",
  "invoice_number": "INV-2025-0055",
  "status": "DRAFT",
  "currency": "USD",
  "subtotal": 500.00,
  "tax": 90.00,
  "total": 590.00,
  "amount_due": 590.00,
  "line_items": [
    {
      "description": "Setup fee",
      "quantity": 1,
      "unit_amount": 500.00,
      "line_total": 500.00
    }
  ]
}