Create Invoice

Create a new invoice that can be sent to customers for payment.

Endpoint

POST /api/invoices

Request Body

ParameterTypeRequiredDescription
customer_idstringYesCustomer identifier
amountnumberYesInvoice amount
currencystringYesCurrency code
descriptionstringNoInvoice description
due_datestringNoDue date (ISO 8601 format)

Response

Returns the created invoice object.
{
  "id": "inv_123456789",
  "customer_id": "cust_123456789",
  "amount": 250.00,
  "currency": "USD",
  "description": "Service invoice",
  "status": "draft",
  "due_date": "2023-02-01T00:00:00Z",
  "created_at": "2023-01-01T00:00:00Z"
}