Vendor Credits

API Reference

Mercoa also supports vendor credit tracking. Vendor credits are credits your users can receive from their vendors that represent the amount of money a vendor owes your user.

Creating Vendor Credits

Vendor credits can be created through Mercoa’s frontend via the entity dashboard or Mercoa’s vendor portal. You can also create vendor credits through the create vendor credit API endpoint.

Applying Vendor Credits

If a vendor credit between the payer and vendor of an invoice is available, Mercoa allows the payer to apply the credit to the invoice. This will deduct the vendor credit amount from the invoice total, reducing the amount transferred through Mercoa.

Mercoa’s frontend will automatically apply available vendor credits to invoices created via the <PayableDetails /> React component. You can also apply vendor credits using the vendorCreditIds parameter on the update invoice API endpoint.

When paying an invoice with vendor credits through Mercoa’s payment rails, there are two scenarios to consider:

Vendor credits partially cover the invoice

If the applied vendor credits sum to less than the invoice total, Mercoa will only transfer the remaining invoice amount to the vendor. In this case, the invoice will enter the PENDING state and be processed normally.

Vendor credits fully cover the invoice

If the applied vendor credits sum to the invoice total or more, Mercoa will not transfer any funds to the vendor. In this case, the invoice will enter the PENDING state and then immediately enter the PAID state. Please note that all the same webhooks will still be sent as if the invoice was paid normally.

Estimating Vendor Credit Usage

You can estimate the usage of vendor credits on an invoice of a given amount using the estimate usage endpoint.