Validate Card Acceptance
API Reference
Mercoa’s Virtual Card Agent enables you to seamlessly detect and validate card payment opportunities from invoice documents.
Usage
To start using the Virtual Card Agent for validation, all you need to have is the invoice document (PDF or HTML).
Validation
First, upon receiving an invoice, you can trigger a validation job with the invoice document to determine if a card conversion is possible.
The Virtual Card Agent can validate card acceptance using multiple input formats:
Document (PDF)
PDF URL
HTML
Job Pending State
When you submit a validation request, the job enters a pending state. During this time:
- The agent analyzes the provided invoice
- Searches for payment links and vendor information
- Determines card acceptance and fee structure
- Processes the validation logic
Upon successful completion, the result of the validation job will contain the following information:
- Whether the vendor accepts card payments
- The associated card processing fees (if applicable)
- A session replay link to review the agent’s actions
Success Response
Failure Response
Response Fields
Webhooks
Mercoa sends webhook notifications when Virtual Card Agent validation jobs complete. You can configure these webhooks in the Mercoa Developer Portal.
Validation Job Completed
When a Virtual Card Agent validation job completes (either successfully or with an error), a webhook with the event type virtualCardAgent.validation.completed
is sent to your configured webhook endpoint.
Webhook Payload:
Error Handling
If a job fails, the webhook will include error information in the response:
For more information about webhooks, see our Webhooks documentation.