Update

Path parameters

invoiceIdstringRequired
Invoice ID or Invoice ForeignID

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
amountdoubleOptional
Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated.
approverslist of objectsOptional
Set approvers for this invoice.
batchPaymentbooleanOptional
If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date.
creatorEntityIdstringOptional

ID or foreign ID of entity who created this invoice. If creating a payable invoice (AP), this must be the same as the payerId. If creating a receivable invoice (AR), this must be the same as the vendorId.

creatorUserIdstringOptional
User ID or Foreign ID of entity user who created this invoice.
currencyenumOptional
Currency code for the amount. Defaults to USD.
deductionDatedatetimeOptional
Initial date when funds are scheduled to be deducted from payer's account.
documentstringOptional

Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB. If the invoice already has a document, this will add a new document to the invoice.

dueDatedatetimeOptional
Due date of invoice.
failureTypeenumOptional
If the invoice failed to be paid, indicate the failure reason. Only applicable for invoices with custom payment methods.
Allowed values:
feesobjectOptional
If using a custom payment method, you can override the default fees for this invoice. If not provided, the default fees for the custom payment method will be used.
foreignIdstringOptional
The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID.
invoiceDatedatetimeOptional
Date the invoice was issued.
invoiceNumberstringOptional
lineItemslist of objectsOptional
metadatamap from strings to stringsOptional
Metadata associated with this invoice.
netTermsintegerOptional
Net terms in days. Must be a positive number.
noteToSelfstringOptional
Note to self or memo on invoice.
ocrJobIdstringOptional
ID of the OCR job that processed this invoice.
payerIdstringOptional
ID or foreign ID of the payer of this invoice.
paymentDestinationIdstringOptional
ID of payment destination for this invoice. If not provided, will attempt to use the default payment destination for the vendor when creating an invoice if a default payment destination exists for the vendor.
paymentDestinationOptionsobjectOptional
Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method.
paymentScheduleobjectOptional

If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice.

paymentSourceIdstringOptional
ID of payment source for this invoice. If not provided, will attempt to use the default payment source for the payer when creating an invoice if a default payment source exists for the payer.
serviceEndDatedatetimeOptional
serviceStartDatedatetimeOptional
settlementDatedatetimeOptional
Date of funds settlement.
shippingAmountdoubleOptional
Shipping amount for this invoice.
statusenumOptional
taxAmountdoubleOptional
Tax amount for this invoice.
vendorCreditIdslist of stringsOptional

The IDs of the vendor credits to be applied to this invoice. Passing this field will un-apply any previously applied vendor credits.

vendorIdstringOptional
ID or foreign ID of the vendor of this invoice.
uploadedImagestringOptionalDeprecated
DEPRECATED. Use document field instead.

Response

This endpoint returns an object.
approvalPolicylist of objects
approverslist of objects
createdAtdatetime
hasDocumentsboolean
True if the invoice has documents attached.
hasSourceEmailboolean
True if the invoice was created by an incoming email.
idstring
metadatamap from strings to strings
Metadata associated with this invoice.
paymentDestinationConfirmedboolean

True if the payment destination has been confirmed by the vendor. False if the payment destination has been set (for example, a check to an address) but has not been confirmed by the vendor.

statusenum
updatedAtdatetime
amountdouble or null
Total amount of invoice in major units
batchPaymentboolean or null
If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date.
commentslist of objects or null
creatorEntityIdstring or null
The ID of the entity who created this invoice.
creatorUserobject or null
Entity user who created this invoice.
currencyenum or null
Currency code for the amount. Defaults to USD.
deductionDatedatetime or null
Initial date when funds are scheduled to be deducted from payer's account. The actual deduction date may differ from this date, and will be reflected in the processedAt field.
dueDatedatetime or null
Due date of invoice.
failureTypeenum or null
If the invoice failed to be paid, this field will be populated with the type of failure.
Allowed values:
feesobject or null
Fees associated with this invoice.
foreignIdstring or null
The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID.
invoiceDatedatetime or null
Date the invoice was issued.
invoiceNumberstring or null
lineItemslist of objects or null
netTermsinteger or null
Net terms in days. Must be a positive number.
nextDeductionDatedatetime or null
For invoice templates, this is the date when the next recurring payment will be scheduled.
noteToSelfstring or null
ocrJobIdstring or null
ID of the OCR job that processed this invoice.
payerobject or null
payerIdstring or null
paymentDestinationobject or null
paymentDestinationIdstring or null
paymentDestinationOptionsobject or null
paymentScheduleobject or null

If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice.

paymentSourceobject or null
paymentSourceIdstring or null
paymentTimingobject or null
processedAtdatetime or null
Date when the invoice payment was processed.
serviceEndDatedatetime or null
serviceStartDatedatetime or null
settlementDatedatetime or null
Date of funds settlement.
shippingAmountdouble or null
Shipping amount for this invoice.
taxAmountdouble or null
Tax amount for this invoice.
transactionslist of objects or null
Transactions associated with this invoice.
vendorobject or null
vendorCreditIdslist of strings or null
The IDs of the vendor credits that are currently applied to this invoice.
vendorIdstring or null

Errors