Skip to main content
In addition to automatic subscription invoices, you can create manual invoices for one-off billing scenarios:
  • Professional services or setup fees
  • Custom contracts
  • Amendment invoices
  • Advance payments

Creating a Manual Invoice

curl -X POST https://api.fluxrate.co/api/v1/invoices \
  -H "Content-Type: application/json" \
  -H "Cookie: access_token=<token>" \
  -d '{
    "customer_id": "<customer_id>",
    "currency": "USD",
    "due_date": "2025-02-14T00:00:00Z",
    "line_items": [
      {
        "description": "Onboarding & setup fee",
        "quantity": 1,
        "unit_amount": 500.00
      },
      {
        "description": "Custom integration work (8 hours)",
        "quantity": 8,
        "unit_amount": 150.00
      }
    ]
  }'

Requirements

  • The customer must have a billing address with country set (required for tax calculation)
  • Line items must have description, quantity, and unit_amount

Invoice Calculation

Subtotal = Σ (quantity × unit_amount) for each line item
Tax     = tax_rate(customer.country, org.country) × subtotal
Total   = Subtotal + Tax

Response

{
  "id": "...",
  "invoice_number": "INV-2025-0055",
  "status": "DRAFT",
  "currency": "USD",
  "subtotal": 1700.00,
  "tax": 306.00,
  "total": 2006.00,
  "amount_due": 2006.00,
  "amount_paid": 0,
  "issue_date": "2025-01-15T00:00:00Z",
  "due_date": "2025-02-14T00:00:00Z",
  "line_items": [
    {
      "description": "Onboarding & setup fee",
      "quantity": 1,
      "unit_amount": 500.00,
      "line_total": 500.00
    },
    {
      "description": "Custom integration work (8 hours)",
      "quantity": 8,
      "unit_amount": 150.00,
      "line_total": 1200.00
    }
  ]
}
After creation, the invoice is in DRAFT status. Use the finalize or send-email endpoint to deliver it to the customer.