Create invoice for account
POST
/accounts/{accountID}/invoices
Create an invoice for a Moov account.
To access this endpoint using an access token
you'll need to specify the /accounts/{accountID}/invoices.write scope.
curl -X POST "https://api.moov.io/accounts/{accountID}/invoices" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.10.00" \
-d '{
"customerAccountID": "string",
"lineItems": {
"items": [
{
"name": "string",
"basePrice": {
"currency": "USD",
"valueDecimal": "12.987654321"
},
"quantity": 1
}
]
}
}'mc, _ := moov.NewClient()
accountID := "241bf524-e777-4941-a5e4-d7f3f34d7a00"
customerAccountID := "3dfff852-927d-47e8-822c-2fffc57ff6b9"
invoice := moov.CreateInvoice{
CustomerAccountID: customerAccountID,
Description: "Professional services for Q1 2026",
LineItems: moov.CreateInvoiceLineItems{
Items: []moov.CreateInvoiceLineItem{
{
Name: "Professional Services",
BasePrice: moov.AmountDecimal{
Currency: "USD",
ValueDecimal: "100.00",
},
Quantity: 1,
Options: []moov.CreateInvoiceLineItemOption{
{
Name: "Additional services",
Quantity: 1,
PriceModifier: &moov.AmountDecimal{
Currency: "USD",
ValueDecimal: "80.00",
},
},
},
},
},
},
}
mc.CreateInvoice(ctx, accountID, invoice)
The resource was successfully created.
{
"invoiceID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
"invoiceNumber": "INV-1001",
"description": "Professional services for Q1 2026",
"customerAccountID": "3dfff852-927d-47e8-822c-2fffc57ff6b9",
"customerDisplayName": "Acme Corp",
"customerEmail": "billing@acmecorp.com",
"partnerAccountID": "5dfff852-927d-47e8-822c-2fffc57ff6b8",
"status": "draft",
"lineItems": {
"items": [
{
"name": "Professional Services",
"basePrice": {
"currency": "USD",
"valueDecimal": "1000.00"
},
"quantity": 1
}
]
},
"subtotalAmount": {
"currency": "USD",
"valueDecimal": "1000.00"
},
"totalAmount": {
"currency": "USD",
"valueDecimal": "1080.00"
},
"pendingAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"paidAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"refundedAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"disputedAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"createdOn": "2024-05-06T12:20:38.184Z",
"invoiceDate": "2026-01-15T00:00:00Z",
"dueDate": "2026-02-15T00:00:00Z"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request contained missing or expired authentication.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The user is not authorized to make the request.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
{
"customerAccountID": "string",
"customerEmail": "string",
"invoiceNumber": "string",
"description": "string",
"lineItems": {
"items": {
"property1": {
"productID": "string",
"name": "string",
"basePrice": {
"currency": "string",
"valueDecimal": "string"
},
"options": {
"property1": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
},
"property2": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
}
},
"quantity": "string"
},
"property2": {
"productID": "string",
"name": "string",
"basePrice": {
"currency": "string",
"valueDecimal": "string"
},
"options": {
"property1": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
},
"property2": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
}
},
"quantity": "string"
}
}
},
"invoiceDate": "string",
"dueDate": "string",
"payment": {
"allowedMethods": "string",
"cardDetails": {
"dynamicDescriptor": "string"
},
"achDetails": {
"companyEntryDescription": "string",
"originatingCompanyName": "string"
}
},
"amountDetails": {
"tax": "string",
"surcharge": "string"
}
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Headers
X-Moov-Version
string
Set this header to v2026.10.00 to use the API described in this specification.
When omitted, the server defaults to v2024.01.00, the earliest supported version, which may not match the behavior documented here.
An unrecognized well-formed version uses the latest supported version that is not newer than the requested version, when one exists.
For example,
v2026.08.00 uses v2026.07.00.
A malformed value, such as 2022, returns a 404 response.
Possible values:
v2026.10.00
Path parameters
Body
application/json
customerAccountID
string
<=36 characters
required
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
lineItems
object
required
A collection of line items for an invoice.
Show child attributes
lineItems
items
array<object>
required
The list of line items.
Show child attributes
lineItems.items[]
options
array<object>
Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
Show child attributes
lineItems.items[].options[]
group
string
<=100 characters
Optional group identifier to categorize related options (e.g., 'toppings').
productID
string
Optional unique identifier associating the line item with a product.
When provided, images associated with the product will be included on the line item.
This does not populate other details of the line item.
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
amountDetails
object
customerEmail
string
Email address to use for invoice checkout OTP verification instead of the customer account email.
invoiceNumber
string
<=64 characters
Optional merchant-defined invoice number, up to 64 characters. Must be unique for the account. If omitted, empty, or whitespace-only, the next number in the INV- sequence is assigned automatically.
payment
object
Payment options for the invoice.
Payment options for an invoice.
Show child attributes
payment
Response
customerAccountID
string
<=36 characters
required
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
disputedAmount
object
required
Total amount of disputes initiated against transfers paid towards the invoice
invoiceID
string
<=36 characters
required
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
lineItems
object
required
A collection of line items for an invoice.
Show child attributes
lineItems
items
array<object>
required
The list of line items.
Show child attributes
lineItems.items[]
images
array<object>
Optional list of images associated with this line item.
options
array<object>
Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
Show child attributes
lineItems.items[].options[]
group
string
<=100 characters
Optional group identifier to categorize related options (e.g., 'toppings').
images
array<object>
Optional list of images associated with this line item option.
productID
string
Optional unique identifier associating the line item with a product.
When provided, images associated with the product will be included on the line item.
This does not populate other details of the line item.
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
partnerAccountID
string
<=36 characters
required
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
refundedAmount
object
required
Total amount of refunds initiated against transfers paid towards the invoice
status
string<enum>
required
Possible values:
draft,
unpaid,
payment-pending,
paid,
overdue,
canceled
totalAmount
object
required
Total amount of the invoice, including subtotal, tax, and surcharge amounts.
amountDetails
object
invoicePayments
array<object>
Payment made towards an invoice, will be either a transfer or an external payment.
Show child attributes
invoicePayments[]
invoicePaymentID
string
<=36 characters
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
payment
object
Payment options for the invoice.
Payment options for an invoice.
Show child attributes
payment