Create an invoice
Create a new invoice for the organization
Authentication
AuthorizationBearer
Bearer token authentication for Mercury API.
Use your API token in the Authorization header:
Authorization: Bearer TOKEN
Example:
Authorization: Bearer secret-token:mercury_production_wma_24SCp4G81X3yHL4Wq8FgzuaP9ye3VKf2mgTDctXyRg5HY_yrucrem
Your Mercury API token should include the ‘secret-token:’ prefix. Tokens can be generated from your Mercury dashboard settings.
Request
This endpoint expects an object.
achDebitEnabled
Whether or not the invoice can be paid via ACH debit.
ccEmails
Emails to be CCed on invoice notifications/reminders.
creditCardEnabled
Whether or not the invoice can be paid via credit card. Requires Stripe to be setup for the Mercury account.
customerId
destinationAccountId
dueDate
invoiceDate
lineItems
The line items for the invoice
useRealAccountNumber
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.
internalNote
Internal note for the invoice, visible by users in the organization but not visible to payers.
invoiceNumber
The payer facing invoice number/identifier.
payerMemo
Memo for the payer of the invoice.
poNumber
Purchase order number for the invoice, if applicable.
sendEmailOption
Allowed values:
servicePeriodEndDate
servicePeriodStartDate
Response
achDebitEnabled
Whether or not the invoice can be paid via ach debit.
amount
The total amount of the invoice line items plus taxes.
ccEmails
Emails to be CCed on invoice notifications/reminders.
createdAt
creditCardEnabled
Whether or not the invoice can be paid via credit card. Requires stripe to be
setup for the Mercury account.
customerId
destinationAccountId
dueDate
id
invoiceDate
invoiceNumber
The payer facing invoice number/identifier.
lineItems
The line items for the invoice.
slug
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
Allowed values:
updatedAt
useRealAccountNumber
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.
canceledAt
internalNote
Internal note for the invoice, visible by users in the
mercury organization but not visible to payers.
payerMemo
Memo for the payer of the invoice.
poNumber
Purchase order number for the invoice if applicable.
servicePeriodEndDate
servicePeriodStartDate
Errors
400
Bad Request Error

