v45

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-2684278289.5 KB
Invoices

Create an invoice

Create a new invoice for the organization

post/ar/invoices

Request body

achDebitEnabledboolean required

Whether or not the invoice can be paid via ACH debit.

ccEmailsEmail[] required

Emails to be CCed on invoice notifications/reminders.

creditCardEnabledboolean required

Whether or not the invoice can be paid via credit card. Requires Stripe to be setup for the Mercury account.

currencyCodestring nullable

ISO 4217 currency code for the invoice. Defaults to USD if not provided.

customerIdstring uuid required

Id of the customer the invoice was sent to.

destinationAccountIdstring uuid required

The 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.

dueDatestring date required

The due date the invoice should be paid by. YYYY-MM-DD

internalNotestring nullable

Internal note for the invoice, visible by users in the organization but not visible to payers.

invoiceDatestring date required

The 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

invoiceNumberstring nullable

The payer facing invoice number/identifier.

payerMemostring nullable

Memo for the payer of the invoice.

poNumberstring nullable

Purchase order number for the invoice, if applicable.

sendEmailOption'DontSend' | 'SendNow' nullable

Rules for emailing the new invoice to payers. Can be "DontSend" to skip sending or "SendNow" to send immediately. If omitted, defaults to sending immediately.

servicePeriodEndDatestring date nullable

The end date for the service period this invoice covers, if applicable. YYYY-MM-DD

servicePeriodStartDatestring date nullable

The start date for the service period this invoice covers, if applicable. YYYY-MM-DD

useRealAccountNumberboolean required

Whether 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.

Example request

{
  "dueDate": "2016-07-22",
  "invoiceDate": "2016-07-22",
  "servicePeriodEndDate": "2016-07-22",
  "servicePeriodStartDate": "2016-07-22"
}

Response

achDebitEnabledboolean required

Whether or not the invoice can be paid via ach debit.

amountnumber required

The total amount of the invoice line items plus taxes.

canceledAtstring yyyy-mm-ddThh:MM:ssZ nullable

The time when the invoice was canceled.

ccEmailsEmail[] required

Emails to be CCed on invoice notifications/reminders.

createdAtstring yyyy-mm-ddThh:MM:ssZ required

The timestamp when the invoice was created.

creditCardEnabledboolean required

Whether or not the invoice can be paid via credit card. Requires stripe to be setup for the Mercury account.

currencyCodestring required

ISO 4217 currency code for the invoice (e.g. "USD", "EUR").

customerIdstring uuid required

Id of the customer the invoice was sent to.

destinationAccountIdstring uuid required

The 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.

dueDatestring date required

The due date the invoice should be paid by.

idstring uuid required

The ID of the invoice.

internalNotestring nullable

Internal note for the invoice, visible by users in the mercury organization but not visible to payers.

invoiceDatestring date required

The 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.

invoiceNumberstring required

The payer facing invoice number/identifier.

payerMemostring nullable

Memo for the payer of the invoice.

poNumberstring nullable

Purchase order number for the invoice if applicable.

servicePeriodEndDatestring date nullable

The end date for the service period this invoice covers, if applicable. YYYY-MM-DD

servicePeriodStartDatestring date nullable

The start date for the service period this invoice covers, if applicable. YYYY-MM-DD

slugstring required

Public slug for an invoice. Used to construct the pay page URL as well as the URL to retrieve the PDF of the invoice.

status'Unpaid' | 'Paid' | 'Cancelled' | 'Processing' required

The status of the invoice.

updatedAtstring yyyy-mm-ddThh:MM:ssZ required

The timestamp when the invoice was updated.

useRealAccountNumberboolean required

Whether or not the invoice payment instructions will show the real account and routing number for the destination account or use virtual account numbers instead.

Example response

{
  "canceledAt": "2016-07-22T00:00:00Z",
  "createdAt": "2016-07-22T00:00:00Z",
  "dueDate": "2016-07-22",
  "invoiceDate": "2016-07-22",
  "servicePeriodEndDate": "2016-07-22",
  "servicePeriodStartDate": "2016-07-22",
  "updatedAt": "2016-07-22T00:00:00Z"
}