Create invoice for account
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: v2027.01.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)
{
"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
{
"error": "string"
}Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
{
"error": "string"
}Response headers
x-request-id
string
required
{
"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
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Response headers
x-request-id
string
required
Headers
X-Moov-Version
string
v2026.08.00 uses v2026.07.00.
A malformed value, such as 2022, returns a 404 response.
v2027.01.00
Path parameters
accountID
string
required
Body
customerAccountID
string
<=36 characters
required
lineItems
object
required
Show child attributes
lineItems
items
array<object>
required
Show child attributes
lineItems.items[]
basePrice
object
required
Show child attributes
lineItems.items[].basePrice
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
name
string
[1 to 150] characters
required
quantity
integer<int32>
required
options
array<object>
Show child attributes
lineItems.items[].options[]
name
string
[1 to 150] characters
required
quantity
integer<int32>
required
group
string
<=100 characters
priceModifier
object
Show child attributes
lineItems.items[].options[].priceModifier
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
productID
string
amountDetails
object
Show child attributes
amountDetails
surcharge
object
Show child attributes
amountDetails.surcharge
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
tax
object
Show child attributes
amountDetails.tax
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
customerEmail
string
description
string
<=4096 characters
dueDate
string<date-time>
invoiceDate
string<date-time>
invoiceNumber
string
<=64 characters
payment
object
Show child attributes
payment
achDetails
object
Show child attributes
payment.achDetails
companyEntryDescription
string
[4 to 10] characters
originatingCompanyName
string
[4 to 16] characters
allowedMethods
array<string>
apple-pay,
card-payment,
ach-debit-collect,
google-pay
cardDetails
object
Show child attributes
payment.cardDetails
dynamicDescriptor
string
[4 to 22] characters
Response
createdOn
string<date-time>
required
customerAccountID
string
<=36 characters
required
customerDisplayName
string
required
customerEmail
string
required
disputedAmount
object
required
Show child attributes
disputedAmount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
invoiceID
string
<=36 characters
required
invoiceNumber
string
required
lineItems
object
required
Show child attributes
lineItems
items
array<object>
required
Show child attributes
lineItems.items[]
basePrice
object
required
Show child attributes
lineItems.items[].basePrice
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
name
string
[1 to 150] characters
required
quantity
integer<int32>
required
images
array<object>
Show child attributes
lineItems.items[].images[]
altText
string
<=125 characters
imageID
string
<=36 characters
link
string<uri>
publicID
string
Pattern
options
array<object>
Show child attributes
lineItems.items[].options[]
name
string
[1 to 150] characters
required
quantity
integer<int32>
required
group
string
<=100 characters
images
array<object>
Show child attributes
lineItems.items[].options[].images[]
altText
string
<=125 characters
imageID
string
<=36 characters
link
string<uri>
publicID
string
Pattern
priceModifier
object
Show child attributes
lineItems.items[].options[].priceModifier
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
productID
string
paidAmount
object
required
Show child attributes
paidAmount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
partnerAccountID
string
<=36 characters
required
pendingAmount
object
required
Show child attributes
pendingAmount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
refundedAmount
object
required
Show child attributes
refundedAmount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
status
string<enum>
required
draft,
unpaid,
payment-pending,
paid,
overdue,
canceled
subtotalAmount
object
required
Show child attributes
subtotalAmount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
totalAmount
object
required
Show child attributes
totalAmount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
amountDetails
object
Show child attributes
amountDetails
surcharge
object
Show child attributes
amountDetails.surcharge
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
tax
object
Show child attributes
amountDetails.tax
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
canceledOn
string<date-time>
description
string
disabledOn
string<date-time>
dueDate
string<date-time>
invoiceDate
string<date-time>
invoicePayments
array<object>
Show child attributes
invoicePayments[]
amount
object
Show child attributes
invoicePayments[].amount
currency
string
required
Pattern
valueDecimal
string
required
Pattern
A decimal-formatted numerical string that represents up to 9 decimal place precision.
For example, $12.987654321 is '12.987654321'.
external
object
Show child attributes
invoicePayments[].external
description
string
foreignID
string
paymentDate
string<date-time>
invoicePaymentID
string
<=36 characters
invoicePaymentType
string<enum>
transfer,
external
transfer
object
Show child attributes
invoicePayments[].transfer
transferID
string
<=36 characters
required
paidOn
string<date-time>
payment
object
Show child attributes
payment
achDetails
object
Show child attributes
payment.achDetails
companyEntryDescription
string
[4 to 10] characters
originatingCompanyName
string
[4 to 16] characters
allowedMethods
array<string>
apple-pay,
card-payment,
ach-debit-collect,
google-pay
cardDetails
object
Show child attributes
payment.cardDetails
dynamicDescriptor
string
[4 to 22] characters
paymentLinkCode
string
paymentLinkURL
string<uri>
sentOn
string<date-time>