Create Invoice
| Time | Status | User Agent | |
|---|---|---|---|
| Make a request to see history. |
URL Expired
The URL for this request expired after 30 days.
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:
lineItemsmemotaxPercentagecurrency
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+quantityfor one-off items, ORpriceId+quantityfor recurring price items
This makes it clearer that quantity is always required, and description is optional only for one-off line items.
templateId: Unique ID of the invoice template to use. If provided, template values will be used forlineItems,memo, andtaxPercentage.recipientId: Deprecated in favor ofclientIdandcompanyId.lineItems: Array of line items. Required iftemplateIdis not provided.memo: Memo (arbitrary string) attached to the invoice, often used for display.daysUntilDue: Required. The number of days from when the invoice is created until it is due. Max value is 30.taxPercentage: Tax percentage to apply to the invoice amount.paymentMethodPreferences: Required. Array of preferences which specify which payment methods are allowed and how transaction fees are handled for each payment method.clientId: The ID of the client this invoice is assigned to. Leave empty if assigning to a company.companyId: The ID of the company this invoice is assigned. This is required when an invoice is assigned to a client with more than one company.
``200 200
``400 400
Updated 11 months ago
ShellNodeRubyPHPPython
xxxxxxxxxx
curl --request POST \
--url https://api.assembly.com/v1/invoices \
--header 'accept: application/json' \
--header 'content-type: application/json'
Click Try It! to start a request and see the response here! Or choose an example:
application/json
200 - Result400 - Result
Updated 11 months ago