v1

latestOpenAPI 3.1.02026-07-265817860.8 KB
invoices

Inserts or updates up to 500 historical invoices without reading or mutating the billing processor.

post/v1/invoices.insert

Headers

x-api-versionstring required

Request body

Example request

{
  "invoices": [
    {
      "customer_id": "cus_123",
      "plan_ids": [
        "pro"
      ],
      "stripe_id": "in_legacy_123",
      "processor_type": "stripe",
      "status": "paid",
      "total": 29.99,
      "amount_paid": 29.99,
      "refunded_amount": 0,
      "currency": "usd",
      "created_at": 1451606400000,
      "hosted_invoice_url": "https://billing.example.com/invoices/legacy-123"
    }
  ]
}

Response

OK

Example response

{
  "invoices": [
    {
      "id": "inv_2b3c4d5e6f7g8h",
      "customer_id": "cus_123",
      "plan_ids": [
        "pro"
      ],
      "stripe_id": "in_legacy_123",
      "processor_type": "stripe",
      "status": "paid",
      "total": 29.99,
      "amount_paid": 29.99,
      "refunded_amount": 0,
      "currency": "usd",
      "created_at": 1451606400000,
      "hosted_invoice_url": "https://billing.example.com/invoices/legacy-123"
    }
  ]
}