Documentation Index
Fetch the complete documentation index at: https://docs.invoica.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get up and running with the Invoica SDK in under 5 minutes.
1. Install the SDK
2. Get Your API Key
Sign up at app.invoica.ai and generate an API key from the API Keys section. Your key will start with inv_.
3. Initialize the Client
import { InvoicaClient } from '@invoica/sdk';
const client = new InvoicaClient({
apiKey: 'inv_your_api_key_here',
baseUrl: 'https://api.invoica.ai',
});
4. Create Your First Invoice
const invoice = await client.invoices.create({
amount: 1000, // Amount in cents ($10.00)
currency: 'USD',
chain: 'base', // 'base' | 'polygon' | 'arbitrum'
description: 'AI Agent API Usage - February 2026',
buyer: {
companyName: 'Acme AI Corp',
email: 'billing@acme-ai.com',
address: '123 Agent Street, San Francisco, CA 94105',
},
seller: {
name: 'My AI Platform',
address: '456 Tech Blvd, Austin, TX 78701',
wallet: '0x1234...abcd', // EVM address
},
});
console.log(`Invoice created: ${invoice.id}`);
console.log(`Status: ${invoice.status}`);
console.log(`Total: $${(invoice.total / 100).toFixed(2)}`);
5. Check Invoice Status
const status = await client.invoices.get(invoice.id);
console.log(`Invoice ${status.invoiceNumber}: ${status.status}`);
Using cURL
curl -X POST https://api.invoica.ai/api/invoices \
-H "Authorization: Bearer inv_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000,
"currency": "USD",
"chain": "base",
"description": "AI Agent API Usage",
"buyer": {
"companyName": "Acme AI Corp",
"email": "billing@acme-ai.com"
},
"seller": {
"name": "My AI Platform",
"wallet": "0x1234...abcd"
}
}'
Next Steps
Authentication
Learn about API key management and request signing.
Webhooks
Get real-time notifications when invoice events occur.
Tax Compliance
Set up automatic tax calculation for your invoices.
API Reference
Explore all available endpoints.