Skip to content

Mercury: Invoices schemas

9 Mercury schemas with complete fields and constraints.

← Invoices operations · All schemas

Create an invoice — request body — body

FieldTypePresenceDescription and constraints
$objectRootThe request body to create an invoice.
Additional keys: not allowed
achDebitEnabledbooleanRequired within parentWhether or not the invoice can be paid via ACH debit.
ccEmailsarrayRequired within parentEmails to be CCed on invoice notifications/reminders.
ccEmails[]stringEach item
creditCardEnabledbooleanRequired within parentWhether or not the invoice can be paid via credit card. Requires Stripe to be setup for the Mercury account.
currencyCodeJSONOptional
currencyCode (anyOf 1)JSONAlternative
currencyCode (anyOf 1) (allOf 1)stringAll variants apply
currencyCode (anyOf 1) (allOf 2)JSONAll variants applyISO 4217 currency code for the invoice. Defaults to USD if not provided.
currencyCode (anyOf 2)nullAlternative
customerIdJSONRequired within parent
customerId (allOf 1)stringAll variants applyThe customer who will receive the invoice. Use the /api/v1/ar/customers endpoint to list your customers and find the corresponding id, or create a new customer first.
Format: uuid
customerId (allOf 2)JSONAll variants applyId of the customer the invoice was sent to.
destinationAccountIdJSONRequired within parent
destinationAccountId (allOf 1)stringAll variants applyID for a Mercury account.
Format: uuid
destinationAccountId (allOf 2)JSONAll variants applyThe Mercury account where invoice payments will be deposited. Use the /api/v1/accounts endpoint to list your accounts and find the corresponding id. Only checking and savings accounts are supported.
dueDateJSONRequired within parent
dueDate (allOf 1)stringAll variants applyFormat: date
dueDate (allOf 2)JSONAll variants applyThe due date the invoice should be paid by. YYYY-MM-DD
internalNoteJSONOptional
internalNote (anyOf 1)stringAlternativeInternal note for the invoice, visible by users in the organization but not visible to payers.
Maximum length: 5000
Minimum length: 1
internalNote (anyOf 2)nullAlternative
invoiceDateJSONRequired within parent
invoiceDate (allOf 1)stringAll variants applyFormat: date
invoiceDate (allOf 2)JSONAll variants applyThe date of the invoice, set by the invoice creator and likely to be context specific to the type of transaction. For example, it could be a date a service was performed. YYYY-MM-DD
invoiceNumberJSONOptional
invoiceNumber (anyOf 1)stringAlternativeThe payer facing invoice number/identifier.
Maximum length: 299
Minimum length: 1
invoiceNumber (anyOf 2)nullAlternative
lineItemsarrayRequired within parentThe line items for the invoice
lineItems[]ModelEach itemExpand Create an invoice — request body — body line Items item
payerMemoJSONOptional
payerMemo (anyOf 1)stringAlternativeMemo for the payer of the invoice.
Maximum length: 5000
Minimum length: 1
payerMemo (anyOf 2)nullAlternative
poNumberJSONOptional
poNumber (anyOf 1)stringAlternativePurchase order number for the invoice, if applicable.
Maximum length: 299
Minimum length: 1
poNumber (anyOf 2)nullAlternative
sendEmailOptionJSONOptional
sendEmailOption (anyOf 1)JSONAlternative
sendEmailOption (anyOf 1) (allOf 1)stringAll variants applyOne of: DontSend, SendNow
sendEmailOption (anyOf 1) (allOf 2)JSONAll variants applyRules for emailing the new invoice to payers. Can be "DontSend" to skip sending or "SendNow" to send immediately. If omitted, defaults to sending immediately.
sendEmailOption (anyOf 2)nullAlternative
servicePeriodEndDateJSONOptional
servicePeriodEndDate (anyOf 1)JSONAlternative
servicePeriodEndDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
servicePeriodEndDate (anyOf 1) (allOf 2)JSONAll variants applyThe end date for the service period this invoice covers, if applicable. YYYY-MM-DD
servicePeriodEndDate (anyOf 2)nullAlternative
servicePeriodStartDateJSONOptional
servicePeriodStartDate (anyOf 1)JSONAlternative
servicePeriodStartDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
servicePeriodStartDate (anyOf 1) (allOf 2)JSONAll variants applyThe start date for the service period this invoice covers, if applicable. YYYY-MM-DD
servicePeriodStartDate (anyOf 2)nullAlternative
useRealAccountNumberbooleanRequired within parentWhether or not the invoice payment instructions will show the real account and routing number for the destination account or use virtual account numbers instead. Virtual accounts are safer and are preferred in most cases.

Referenced models: Create an invoice — request body — body line Items item

Create an invoice — request body — body line Items item

FieldTypePresenceDescription and constraints
$objectRootData for an invoice line item
Additional keys: not allowed
namestringRequired within parentthe name of the line item
Maximum length: 299
Minimum length: 1
quantitynumberRequired within parentthe quantity of this item
Format: double
salesTaxRateJSONOptional
salesTaxRate (anyOf 1)numberAlternativethe sales tax applied to this item
Format: double
salesTaxRate (anyOf 2)nullAlternative
unitPricenumberRequired within parentthe price of one unit of the item before sales tax
Multiple of: 0.01

Get an attachment — response body

FieldTypePresenceDescription and constraints
$objectRootThe object representing a file attachment for an invoice.
The file is not a part of this object itself but information
for where to download it will be in this object.
fileNamestringRequired within parentThe filename for the file.
Maximum length: 299
Minimum length: 1
idJSONRequired within parent
id (allOf 1)stringAll variants applyID for the attachment.
Format: uuid
id (allOf 2)JSONAll variants applyThe ID of the attachment object.
urlstringRequired within parentThe signed download URL for the file itself.

Get an invoice — response body

FieldTypePresenceDescription and constraints
$objectRootThe response type for an invoice in the api.
achDebitEnabledbooleanRequired within parentWhether or not the invoice can be paid via ach debit.
amountJSONRequired within parent
amount (anyOf 1)numberAlternativeThe total amount of the invoice line items plus taxes.
Multiple of: 0.01
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
canceledAtJSONOptional
canceledAt (anyOf 1)JSONAlternative
canceledAt (anyOf 1) (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
canceledAt (anyOf 1) (allOf 2)JSONAll variants applyThe time when the invoice was canceled.
canceledAt (anyOf 2)nullAlternative
ccEmailsarrayRequired within parentEmails to be CCed on invoice notifications/reminders.
ccEmails[]stringEach item
createdAtJSONRequired within parent
createdAt (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
createdAt (allOf 2)JSONAll variants applyThe timestamp when the invoice was created.
creditCardEnabledbooleanRequired within parentWhether or not the invoice can be paid via credit card. Requires stripe to be
setup for the Mercury account.
currencyCodeJSONRequired within parent
currencyCode (allOf 1)stringAll variants apply
currencyCode (allOf 2)JSONAll variants applyISO 4217 currency code for the invoice (e.g. "USD", "EUR").
customerIdJSONRequired within parent
customerId (allOf 1)stringAll variants applyThe customer who will receive the invoice. Use the /api/v1/ar/customers endpoint to list your customers and find the corresponding id, or create a new customer first.
Format: uuid
customerId (allOf 2)JSONAll variants applyId of the customer the invoice was sent to.
destinationAccountIdJSONRequired within parent
destinationAccountId (allOf 1)stringAll variants applyID for a Mercury account.
Format: uuid
destinationAccountId (allOf 2)JSONAll variants applyThe Mercury account where invoice payments will be deposited. Use the /api/v1/accounts endpoint to list your accounts and find the corresponding id. Only checking and savings accounts are supported.
dueDateJSONRequired within parent
dueDate (allOf 1)stringAll variants applyFormat: date
dueDate (allOf 2)JSONAll variants applyThe due date the invoice should be paid by.
idJSONRequired within parent
id (allOf 1)stringAll variants applyID for the invoice.
Format: uuid
id (allOf 2)JSONAll variants applyThe ID of the invoice.
internalNoteJSONOptional
internalNote (anyOf 1)stringAlternativeInternal note for the invoice, visible by users in the
mercury organization but not visible to payers.
Maximum length: 5000
Minimum length: 1
internalNote (anyOf 2)nullAlternative
invoiceDateJSONRequired within parent
invoiceDate (allOf 1)stringAll variants applyFormat: date
invoiceDate (allOf 2)JSONAll variants applyThe date of the invoice, set by the invoice creator
and likely to be context specific to the type of transaction.
i.e. it could be a date a service was performed, it does not need
to be the date the invoice was created.
invoiceNumberstringRequired within parentThe payer facing invoice number/identifier.
Maximum length: 299
Minimum length: 1
lineItemsarrayRequired within parentThe line items for the invoice.
lineItems[]ModelEach itemExpand Get an invoice — response body — line Items item
payerMemoJSONOptional
payerMemo (anyOf 1)stringAlternativeMemo for the payer of the invoice.
Maximum length: 5000
Minimum length: 1
payerMemo (anyOf 2)nullAlternative
poNumberJSONOptional
poNumber (anyOf 1)stringAlternativePurchase order number for the invoice if applicable.
Maximum length: 299
Minimum length: 1
poNumber (anyOf 2)nullAlternative
servicePeriodEndDateJSONOptional
servicePeriodEndDate (anyOf 1)JSONAlternative
servicePeriodEndDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
servicePeriodEndDate (anyOf 1) (allOf 2)JSONAll variants applyThe end date for the service period this invoice covers, if applicable. YYYY-MM-DD
servicePeriodEndDate (anyOf 2)nullAlternative
servicePeriodStartDateJSONOptional
servicePeriodStartDate (anyOf 1)JSONAlternative
servicePeriodStartDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
servicePeriodStartDate (anyOf 1) (allOf 2)JSONAll variants applyThe start date for the service period this invoice covers, if applicable. YYYY-MM-DD
servicePeriodStartDate (anyOf 2)nullAlternative
slugstringRequired within parentPublic slug for an invoice. Used to construct the pay page URL
as well as the URL to retrieve the PDF of the invoice.
statusJSONRequired within parent
status (allOf 1)stringAll variants applyKnown values: Unpaid, Paid, Cancelled, Processing
status (allOf 2)JSONAll variants applyThe status of the invoice.
updatedAtJSONRequired within parent
updatedAt (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
updatedAt (allOf 2)JSONAll variants applyThe timestamp when the invoice was updated.
useRealAccountNumberbooleanRequired within parentWhether or not the invoice payment instructions will show the real
account and routing number for the destination account or use
virtual account numbers instead.

Referenced models: Get an invoice — response body — line Items item

Get an invoice — response body — line Items item

FieldTypePresenceDescription and constraints
$objectRootData for an invoice line item
namestringRequired within parentthe name of the line item
Maximum length: 299
Minimum length: 1
quantityJSONRequired within parent
quantity (anyOf 1)numberAlternativethe quantity of this item
Format: double
quantity (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
salesTaxRateJSONOptional
salesTaxRate (anyOf 1)JSONAlternative
salesTaxRate (anyOf 1) (anyOf 1)numberAlternativethe sales tax applied to this item
Format: double
salesTaxRate (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
salesTaxRate (anyOf 2)nullAlternative
unitPriceJSONRequired within parent
unitPrice (anyOf 1)numberAlternativethe price of one unit of the item before sales tax
Multiple of: 0.01
unitPrice (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

List all invoices — response body

FieldTypePresenceDescription and constraints
$objectRootPaginated response containing a list of invoices.
| Use the page cursor information to fetch additional pages of invoices.
invoicesarrayRequired within parentList of invoices in the current page
invoices[]ModelEach itemExpand List all invoices — response body — invoices item
pageobjectRequired within parentPagination information including cursors for navigating to next/previous pages
page.nextPagestringOptionalID for the invoice.
Format: uuid
page.previousPagestringOptionalID for the invoice.
Format: uuid

Referenced models: List all invoices — response body — invoices item

List all invoices — response body — invoices item

FieldTypePresenceDescription and constraints
$objectRootResponse data for Accounts Receivable invoices API Endpoint
achDebitEnabledbooleanRequired within parentWhether or not the invoice can be paid via ach debit.
amountJSONRequired within parent
amount (anyOf 1)numberAlternativeThe total amount of the invoice line items plus taxes
Multiple of: 0.01
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
canceledAtJSONOptional
canceledAt (anyOf 1)JSONAlternative
canceledAt (anyOf 1) (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
canceledAt (anyOf 1) (allOf 2)JSONAll variants applyThe time when the invoice was canceled.
canceledAt (anyOf 2)nullAlternative
ccEmailsarrayRequired within parentEmails to be CCed on invoice notifications/reminders.
ccEmails[]stringEach item
createdAtJSONRequired within parent
createdAt (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
createdAt (allOf 2)JSONAll variants applyThe timestamp when the invoice was created.
creditCardEnabledbooleanRequired within parentWhether or not the invoice can be paid via credit card. Requires stripe to be
setup for the Mercury account.
currencyCodeJSONRequired within parent
currencyCode (allOf 1)stringAll variants apply
currencyCode (allOf 2)JSONAll variants applyISO 4217 currency code for the invoice (e.g. "USD", "EUR").
customerIdJSONRequired within parent
customerId (allOf 1)stringAll variants applyThe customer who will receive the invoice. Use the /api/v1/ar/customers endpoint to list your customers and find the corresponding id, or create a new customer first.
Format: uuid
customerId (allOf 2)JSONAll variants applyId of the customer the invoice was sent to.
destinationAccountIdJSONRequired within parent
destinationAccountId (allOf 1)stringAll variants applyID for a Mercury account.
Format: uuid
destinationAccountId (allOf 2)JSONAll variants applyThe Mercury account where invoice payments will be deposited. Use the /api/v1/accounts endpoint to list your accounts and find the corresponding id. Only checking and savings accounts are supported.
dueDateJSONRequired within parent
dueDate (allOf 1)stringAll variants applyFormat: date
dueDate (allOf 2)JSONAll variants applyThe due date the invoice should be paid by.
idJSONRequired within parent
id (allOf 1)stringAll variants applyID for the invoice.
Format: uuid
id (allOf 2)JSONAll variants applyThe ID of the invoice.
internalNoteJSONOptional
internalNote (anyOf 1)stringAlternativeInternal note for the invoice, visible by users in the
mercury organization but not visible to payers.
Maximum length: 5000
Minimum length: 1
internalNote (anyOf 2)nullAlternative
invoiceDateJSONRequired within parent
invoiceDate (allOf 1)stringAll variants applyFormat: date
invoiceDate (allOf 2)JSONAll variants applyThe date of the invoice, set by the invoice creator
and likely to be context specific to the type of transaction.
i.e. it could be a date a service was performed, it does not need
to be the date the invoice was created.
invoiceNumberstringRequired within parentThe payer facing invoice number/identifier.
Maximum length: 299
Minimum length: 1
payerMemoJSONOptional
payerMemo (anyOf 1)stringAlternativeMemo for the payer of the invoice.
Maximum length: 5000
Minimum length: 1
payerMemo (anyOf 2)nullAlternative
poNumberJSONOptional
poNumber (anyOf 1)stringAlternativePurchase order number for the invoice if applicable.
Maximum length: 299
Minimum length: 1
poNumber (anyOf 2)nullAlternative
slugstringRequired within parentA unique identifier used to build public URLs for this invoice. Use it to construct the payment page URL (https://app.mercury.com/pay/{slug}) or fetch the invoice PDF via /api/v1/ar/invoices/{slug}/pdf.
statusJSONRequired within parent
status (allOf 1)stringAll variants applyKnown values: Unpaid, Paid, Cancelled, Processing
status (allOf 2)JSONAll variants applyThe status of the invoice.
updatedAtJSONRequired within parent
updatedAt (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
updatedAt (allOf 2)JSONAll variants applyThe timestamp when the invoice was updated.
useRealAccountNumberbooleanRequired within parentWhether or not the invoice payment instructions will show the real
account and routing number for the destination account or use
virtual account numbers instead.

List invoice attachments — response body

FieldTypePresenceDescription and constraints
$objectRootThe response type for fetching attachments related to an AR Invoice.
attachmentsarrayRequired within parentThe list of attachments
attachments[]ModelEach itemExpand Get an attachment — response body

Referenced models: Get an attachment — response body

Update an invoice — request body — body

FieldTypePresenceDescription and constraints
$objectRootThe request body to update an invoice.
Additional keys: not allowed
achDebitEnabledbooleanRequired within parentWhether or not the invoice can be paid via ACH debit.
ccEmailsarrayRequired within parentList of emails to be CCed on notifications/reminders.
ccEmails[]stringEach item
creditCardEnabledbooleanRequired within parentWhether or not the invoice can be paid via credit card. Requires Stripe to be setup for the Mercury account.
dueDateJSONRequired within parent
dueDate (allOf 1)stringAll variants applyFormat: date
dueDate (allOf 2)JSONAll variants applyThe date the invoice should be paid by. YYYY-MM-DD
internalNoteJSONOptional
internalNote (anyOf 1)stringAlternativeInternal note for the invoice, visible by users in the organization but not visible to payers.
Maximum length: 5000
Minimum length: 1
internalNote (anyOf 2)nullAlternative
invoiceDateJSONRequired within parent
invoiceDate (allOf 1)stringAll variants applyFormat: date
invoiceDate (allOf 2)JSONAll variants applyThe date of the invoice, set by the invoice creator. Does not have to be the day the invoice was created. It can be business specific i.e. service/sale date. YYYY-MM-DD
invoiceNumberstringRequired within parentThe invoice number.
Maximum length: 299
Minimum length: 1
lineItemsarrayRequired within parentThe line items for the invoice
lineItems[]ModelEach itemExpand Create an invoice — request body — body line Items item
payerMemoJSONOptional
payerMemo (anyOf 1)stringAlternativeMemo for the payer of the invoice.
Maximum length: 5000
Minimum length: 1
payerMemo (anyOf 2)nullAlternative
poNumberJSONOptional
poNumber (anyOf 1)stringAlternativeThe purchase order number for the invoice if applicable.
Maximum length: 299
Minimum length: 1
poNumber (anyOf 2)nullAlternative
servicePeriodEndDateJSONOptional
servicePeriodEndDate (anyOf 1)JSONAlternative
servicePeriodEndDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
servicePeriodEndDate (anyOf 1) (allOf 2)JSONAll variants applyThe end date for the service period this invoice covers, if applicable. YYYY-MM-DD
servicePeriodEndDate (anyOf 2)nullAlternative
servicePeriodStartDateJSONOptional
servicePeriodStartDate (anyOf 1)JSONAlternative
servicePeriodStartDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
servicePeriodStartDate (anyOf 1) (allOf 2)JSONAll variants applyThe start date for the service period this invoice covers, if applicable. YYYY-MM-DD
servicePeriodStartDate (anyOf 2)nullAlternative
useRealAccountNumberbooleanRequired within parentWhether or not the invoice payment instructions will show the real account and routing number for the destination account or use virtual account numbers instead.

Referenced models: Create an invoice — request body — body line Items item

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.