> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mercoa.com/virtual-card-agent/how-it-works/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server. # How the Mercoa Virtual Card Agent Works The Mercoa Virtual Card Agent automates both card acceptance validation and payment execution using AI-powered workflows. This eliminates manual steps, increases reliability, and ensures compliance with security best practices. ## Step 1: Validate Card Acceptance [View Full Documentation](/guides/virtual-card-agent/validate-card-acceptance) ### How the Agent Determines Card Eligibility The Virtual Card Agent uses several methods to identify whether a vendor accepts card payments: 1. **Payment Link Analysis**\ The agent scans invoice documents for payment links and inspects the linked pages to determine if card payments are supported. 2. **Vendor Portal Search**\ If no payment link is found, the agent searches the vendor's website or billing portal to identify card acceptance options. 3. **Direct Vendor Contact** *(Future Support)*\ In upcoming versions, the agent will be able to call vendors directly to confirm card acceptance preferences. ### Fee Detection * The agent extracts fee details directly from invoices, payment pages, and vendor portals. * In cases where fee information is unclear or inconsistent, the agent defaults to conservative logic and may return false. * If card acceptance cannot be confidently confirmed, the agent marks the invoice as not eligible for card payment. ## Step 2: Process Card Payment [View Full Documentation](/guides/virtual-card-agent/process-card-payments/process-payment) ### Payment Execution Workflow 1. **Secure Card Submission**\ Submit virtual card details to Mercoa using either of the following methods: * **Secure iFrame** (recommended) * **Raw Card Details** 2. **Automated Portal Navigation**\ The agent logs into the vendor's portal, fills out payment forms, and submits the virtual card payment. 3. **Receipt Capture & Reconciliation**\ After submitting the payment, the agent captures the transaction receipt and returns it to your platform for recordkeeping and reconciliation. ### Security Best Practices * All card information is handled securely through encrypted channels. * Virtual cards are recommended for enhanced security. * One-time-use virtual cards loaded with the exact invoice amount are recommended for maximum security and reconciliation accuracy. ## Edge Cases & Limitations * **Fees/Acceptance Unclear:** If the agent can't definitively decide card acceptance or fee structure, it will return a negative result. * **Payment Gateway Errors:** The job result and webhook will return errors such as invalid card, insufficient funds, or missing payment link. * **Rate Limits & Quotas:** Standard API rate limits apply; contact [support@mercoa.com](mailto:support@mercoa.com) for high-volume requirements. * **Supported File Formats:** The system supports PDF and HTML invoices; scanned documents may have variable results.