Creates a new invoice in draft status. Totals are automatically calculated from the provided line items.
Invoice numbers are auto-generated using the format {PREFIX}-{YEAR}-{COUNTER} where the counter is a 6-digit zero-padded number (e.g., INV-2025-000001).
If issue_date is not provided, today’s date is used. If due_date is not provided, it defaults to 30 days after the issue date.
url_success and url_failed fields use the secure HTTPS protocol, use domain names (not IP addresses) and are considered clean by VirusTotal and similar scanners.
The end_user_reference parameter is used to group, track and analyse transactions made by a specific customer. To prevent transactions from getting delayed or cancelled, always make sure to include the correct ID. The ID must not contain any personal or identifying customer data.
If you do not provide sender data in the request, the invoice will still be created, but your customer will be prompted for their data on the invoice form. If the customer is already registered in your system, include their end_user_reference and the sender_data object for a smoother user experience.API key authentication. Generate keys from the Corebill dashboard under the Developers section.
Example: Authorization: Bearer sk_live_abc123def456
The company ID to scope the request to
Customer ID to associate with this invoice
"cus_a1b2c3d4e5f6"
Invoice issue date (defaults to today)
"2025-04-15"
Payment due date (defaults to 30 days from issue_date)
"2025-05-15"
Currency code (ISO 4217). Defaults to company currency or USD
"USD"
Invoice notes visible to the customer
"Thank you for your business"
Payment terms description
"Net 30"
Tax rate as a percentage (e.g., 16 for 16%)
16
Tax identifier or label
"VAT"
Type of discount to apply
percentage, fixed "percentage"
Discount value (percentage or fixed amount)
10
Line items for the invoice
Invoice created successfully
Full invoice object including items and public_token (returned by GET /invoices/{id} and POST /invoices)