> ## 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

> Create your first Invoica invoice in under 5 minutes.

# Quickstart

Get up and running with the Invoica SDK in under 5 minutes.

## 1. Install the SDK

<CodeGroup>
  ```bash npm theme={null}
  npm install @invoica/sdk
  ```

  ```bash yarn theme={null}
  yarn add @invoica/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @invoica/sdk
  ```
</CodeGroup>

## 2. Get Your API Key

Sign up at [app.invoica.ai](https://app.invoica.ai) and generate an API key from the **API Keys** section. Your key will start with `inv_`.

## 3. Initialize the Client

```typescript theme={null}
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

<CodeGroup>
  ```typescript EVM (Base / Polygon / Arbitrum) theme={null}
  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)}`);
  ```

  ```typescript Solana theme={null}
  const invoice = await client.invoices.create({
    amount: 1000,        // Amount in cents ($10.00)
    currency: 'USD',
    chain: 'solana',
    description: 'AI Agent API Usage - February 2026',
    buyer: {
      companyName: 'Acme AI Corp',
      email: 'billing@acme-ai.com',
    },
    seller: {
      name: 'My AI Platform',
      wallet: 'YourSolanaWalletAddressBase58Here',  // Base58 address
    },
  });

  console.log(`Invoice created: ${invoice.id}`);
  console.log(`Status: ${invoice.status}`);
  ```
</CodeGroup>

## 5. Check Invoice Status

```typescript theme={null}
const status = await client.invoices.get(invoice.id);
console.log(`Invoice ${status.invoiceNumber}: ${status.status}`);
```

## Using cURL

<CodeGroup>
  ```bash EVM (Base) theme={null}
  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"
      }
    }'
  ```

  ```bash Solana theme={null}
  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": "solana",
      "description": "AI Agent API Usage",
      "buyer": {
        "companyName": "Acme AI Corp",
        "email": "billing@acme-ai.com"
      },
      "seller": {
        "name": "My AI Platform",
        "wallet": "YourSolanaWalletAddressBase58Here"
      }
    }'
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn about API key management and request signing.
  </Card>

  <Card title="Webhooks" icon="bell" href="/guides/webhooks">
    Get real-time notifications when invoice events occur.
  </Card>

  <Card title="Tax Compliance" icon="calculator" href="/guides/tax-compliance">
    Set up automatic tax calculation for your invoices.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/overview">
    Explore all available endpoints.
  </Card>
</CardGroup>
