Integrating Mercoa with your BillPay / AP System
Overview
Mercoa’s Virtual Card Agent seamlessly integrates into your existing BillPay / AP workflows to automatically process invoice payments using virtual cards. It’s designed to automatically pay invoices using virtual cards whenever it’s possible and cost-effective. The integration includes a straightforward decision-based flow with a fallback to your current payment system, ensuring no disruption.
Integration Flow
This process is handled in two main phases: validation and processing. Your system first checks if an invoice is eligible for card payment and then acts on that information.
Validation Flow
This chart shows the initial decision-making process.
Processing Flow
If an invoice is cleared for card payment, this is the next step.
Implementation Steps
1. Trigger the Validation
When a payment is scheduled in your system, make a call to the Mercoa Agent’s validation endpoint. This is the entry point to the workflow.
2. Call the Validation Endpoint
Use the Mercoa Agent validation endpoint to check if the vendor’s invoice can be processed with a virtual card.
JavaScript
Python
Go
Java
3. Analyze the Validation Response
The validation endpoint returns a response indicating whether the invoice can be paid with a card and lists any applicable fees.
- Whether the invoice can be processed with a virtual card
- The processing fee (if applicable)
- Any additional requirements or restrictions
4. Apply Your Decision Logic
Based on the validation response, implement logic on your side to decide the next step.
-
If card processing isn’t available, fall back to your current workflow.
-
If it is available, check if the fee is within your acceptable threshold. If not, fall back.
-
If the fee is acceptable, proceed to process the payment with a virtual card.
JavaScript
Python
Go
Java
5. Process the Payment
If the decision is to use a virtual card, call Mercoa process endpoint. Your implementation should handle both success and failure. If the payment fails for any reason, fall back to your existing workflow.
JavaScript
Python
Go
Java
6. Reconcile the Payment
When a virtual card payment succeeds, you must reconcile the payment on your side. This typically means updating your invoice’s status to “paid” and storing the transaction details for your records.
JavaScript
Python
Go
Java
Migration Strategy
We recommend a phased approach to roll out the integration.
Phase 1: Validation Only
-
Implement the validation endpoint call.
-
Log the results to analyze vendor eligibility rates and potential fees without actually processing payments.
Phase 2: Limited Processing
-
Enable virtual card processing for a small, selected group of low-risk vendors or invoices.
-
Monitor success rates and ensure your reconciliation logic works as expected.
Phase 3: Full Integration
-
Enable the workflow for all eligible invoices.
-
Ensure your fallback mechanisms are robust.
-
Continuously monitor and optimize based on performance data.