Create an invoice

Create a new invoice for the organization

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint generates an invoice. If the sendEmailOption parameter is omitted or is set to sendNow, the invoice will be emailed immediately to the customer identified by the customerId.

If you do not provide an invoiceNumber parameter in the body, the system will attempt to generate one based on the last invoice sent to this customer.

🚧

When creditCardEnabled is set to true in the request body, the API validates that a Stripe account is connected to your organization's Mercury account and performs basic checks to ensure the Stripe account can accept card payments. If these checks fail, the invoice creation request will fail with a 400 response. However, intermittent Stripe errors may still cause credit card payments to fail.

Body Params

The request body to create an invoice.

boolean
required

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

ccEmails
array of objects
required

Emails to be CCed on invoice notifications/reminders.

ccEmails*
boolean
required

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

string | null

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

uuid
required

Id of the customer the invoice was sent to.

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.

date
required

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

string | null

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

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

string | null

The payer facing invoice number/identifier.

lineItems
array of objects
required

The line items for the invoice

lineItems*
string | null

Memo for the payer of the invoice.

string | null

Purchase order number for the invoice, if applicable.

string | null
enum

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.

Allowed:
date | null

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

date | null

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

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

Responses

400

Invalid body

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json