Installation
Install the Package
Requirements
- Node.js 18 or later
- TypeScript 5.0 or later (recommended)
Basic Setup
1. Create a Client Instance
2. Make Your First API Call
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your Invoica API key |
baseUrl | string | https://api.invoica.ai | API base URL |
timeout | number | 30000 | Request timeout in ms |
retries | number | 3 | Max retry attempts |
debug | boolean | false | Enable debug logging |
Environment Variables
We recommend storing your API key in environment variables:Using with React
For React applications, import hooks directly:Sandbox Mode
Use the sandbox environment for testing:Get a sandbox API key from the Dashboard by toggling to “Test Mode”.