> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orthogonal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transactions

> View your credit transaction history

Returns your credit transaction history, including purchases, API call charges, and refunds.

## Authentication

Requires a valid API key via `Authorization: Bearer YOUR_API_KEY`.

## Query Parameters

<ParamField query="limit" type="number" default="50">
  Maximum number of transactions to return.
</ParamField>

<ParamField query="offset" type="number" default="0">
  Offset for pagination.
</ParamField>

## Response

```json theme={null}
{
  "transactions": [
    {
      "id": "tx_abc123",
      "type": "api_call",
      "amountCents": -3000,
      "description": "API call: apollo /v1/people/match",
      "timestamp": "2026-02-27T10:30:00Z",
      "metadata": {
        "api": "apollo",
        "path": "/v1/people/match"
      }
    },
    {
      "id": "tx_def456",
      "type": "purchase",
      "amountCents": 1000000,
      "description": "Credit purchase: 10,000 credits",
      "timestamp": "2026-02-25T14:00:00Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "count": 2
  }
}
```

### Response Fields

| Field                        | Type     | Description                                               |
| ---------------------------- | -------- | --------------------------------------------------------- |
| `transactions`               | `array`  | List of transactions                                      |
| `transactions[].id`          | `string` | Transaction ID                                            |
| `transactions[].type`        | `string` | Transaction type (`api_call`, `purchase`, `refund`, etc.) |
| `transactions[].amountCents` | `number` | Amount (negative for charges, positive for credits)       |
| `transactions[].description` | `string` | Human-readable description                                |
| `transactions[].timestamp`   | `string` | ISO 8601 timestamp                                        |
| `transactions[].metadata`    | `object` | Additional context (API slug, path, etc.)                 |

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl 'https://api.orthogonal.com/v1/credits/transactions?limit=20' \
    -H 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.orthogonal.com/v1/credits/transactions?limit=20', {
    headers: {
      'Authorization': `Bearer ${process.env.ORTHOGONAL_API_KEY}`
    }
  });

  const { transactions } = await response.json();

  // Separate charges and purchases
  const charges = transactions.filter(t => t.amountCents < 0);
  const purchases = transactions.filter(t => t.amountCents > 0);
  console.log(`${charges.length} charges, ${purchases.length} purchases`);
  ```

  ```python Python theme={null}
  import requests
  import os

  response = requests.get(
      'https://api.orthogonal.com/v1/credits/transactions',
      headers={'Authorization': f'Bearer {os.environ["ORTHOGONAL_API_KEY"]}'},
      params={'limit': 20}
  )

  transactions = response.json()['transactions']
  for tx in transactions:
      amount = tx['amountCents'] / 100000
      print(f"{tx['type']:12} ${amount:+.4f}  {tx['description']}")
  ```
</CodeGroup>
