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.
Lithic provides virtual card infrastructure that integrates seamlessly with the Mercoa Virtual Card Agent. The integration uses Lithic’s embedded card iframe technology to securely display and interact with virtual cards.
Integration Setup
Enable Lithic in Your Account
To start using Lithic with the Virtual Card Agent:
Complete the application process and KYB verification
Set up your card program in the Lithic dashboard
Obtain your API keys
Generate embed requests and HMAC signatures for card display
Create Virtual Card
Create virtual cards for specific invoices:
1
const virtualCard = await lithic.cards.create({
2
type: 'VIRTUAL',
3
program_id: cardProgram.token,
4
spend_controls: {
5
spend_limit: invoice.amount * 100, // Amount in cents
6
spend_limit_duration: 'TRANSACTION'
7
},
8
state: 'ACTIVE',
9
metadata: {
10
invoice_id: invoice.id,
11
vendor_id: invoice.vendor_id
12
}
13
});
This is just an example, please refer to the Lithic documentation for more information.
API Integration
The Lithic integration with the Virtual Card Agent provides a secure, automated workflow for processing virtual card payments using Lithic’s embedded card iframe technology.
How It Works
The integration follows a secure workflow where your Lithic virtual card is embedded and used to process payments through the Virtual Card Agent:
Process Flow:
Create a Lithic virtual card with spending controls matching the invoice amount
Generate an embed request with card token and styling configuration
Create an HMAC signature for the embed request using your Lithic API key
Call the Mercoa API with the embed request and HMAC signature
The agent displays the card securely through Lithic’s iframe technology
Card details are extracted and used to complete payment through the vendor’s payment gateway
Receipt and confirmation details are captured for reconciliation
API Request Structure
When using Lithic with the Virtual Card Agent, your API request should include: