For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
HomeGuidesAPI ReferenceGlossary
      • Creating and Managing Payers (C2s)
      • Creating and Managing Vendors (C3s)
      • Creating Payouts via API
      • Invoices
      • Batch Payments
      • Recurring Payments
      • Approval Policies
      • Email Inbox
      • GL Accounts
      • Vendor Credits
      • Accounting Sync
Logo
Sign inBook a demo
On this page
  • Enabling Batch Payments
  • How Batch Payments Work
  • Bank Payments
  • Check Payments
  • When Batch Payments Are Created
  • Printed Check Batches
Accounts Payable

Batch Payments

Was this page helpful?
Previous

Recurring Payments

Next
Built with

Batch payments allow your customers to pay multiple invoices in a single transaction.

Batch payments are only available for bankAccount and check payments. custom payments are not officially supported, but you can implement them yourself.

Enabling Batch Payments

To enable batch payments, you set batchPayment on the invoice to true. This field will be true if the invoice is a batch payment, and false otherwise.

The Mercoa <PayableDetails /> React component also supports batch payments using the <PaymentOptions /> sub-component. To enable batch payments, you must explicitly include the PaymentOptions component within your PayableDetails implementation.

1// Usage with PaymentOptions component to enable batch payments
2<PayableDetails>
3 <PaymentOptions />
4</PayableDetails>
POST
/invoice/:invoiceId
1curl -X POST https://api.mercoa.com/invoice/in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9 \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "batchPayment": true
6}'
Try it

How Batch Payments Work

Mercoa automatically batches payments for invoices that have the batchPayment field set to true. This means that you don’t need to manually batch payments.

Mercoa uses the following logic to determine if an invoice is part of a batch:

  1. If the invoice has the batchPayment field set to true
  2. The invoice has the same payerId and vendorId
  3. The invoice has the same paymentSourceId and paymentDestinationId
  4. The invoice has the same paymentDestinationOptions
  5. The invoice has the same deductionDate
  6. The invoice has status of SCHEDULED

If any of these conditions aren’t met, the invoice is considered a separate payment.

Bank Payments

Mercoa sends a single ACH payment for all invoices in a batch. The paymentDestinationOptions memo assumes that all the invoices in the batch contain the same memo, as one is chosen at random.

Check Payments

Mercoa sends a single check payment for all invoices in a batch. The check will also contain a table of the invoices in the batch.

When Batch Payments Are Created

On the deductionDate, Mercoa will create a batch payment for the invoices in the batch. This batch will be created at the last payment window of the day, so invoices can be added to the batch until the last payment window.

Printed Check Batches

Because printed checks are not processed by Mercoa’s payment job, when any invoice in a batch is marked as PAID, Mercoa will process all invoices in the batch.