post https://api.copilot.app/v1/invoices
This API endpoint create an invoice and automatically assigns it to given recipient to pay
Template Usage
When creating an invoice using a template (by specifying templateId
), certain fields will be automatically populated from the template unless it is not explicitly overridden in the request:
lineItems
memo
taxPercentage
currency
Payment Preferences
The paymentMethodPreferences
array allows you to specify:
- Which payment methods are accepted (
paymentMethodTypes
) - If transaction fee would be paid by the client/company, or by your account
Line Items
When creating line items, you must provide:
For one-off items:
amount
(required) - Amount in centsdescription
(optional) - Description of the itemquantity
(required) - Quantity of the item (supports decimals)
For recurring price items:
priceId
(required) - ID of the Prices objectquantity
(required) - Quantity of the item (supports decimals)
All line items must have either:
amount
+quantity
for one-off items, ORpriceId
+quantity
for recurring price items
This makes it clearer that quantity
is always required, and description
is optional only for one-off line items.