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

# List Transactions

> List all wallet transactions

Returns a list of all transactions (charges, credits, refunds) for your wallet.

## Query Parameters

<ParamField query="type" type="string">
  Filter by type: `charge`, `credit`, `refund`
</ParamField>

<ParamField query="agentId" type="string">
  Filter by agent ID
</ParamField>

<ParamField query="startDate" type="string">
  ISO 8601 date to filter from
</ParamField>

<ParamField query="endDate" type="string">
  ISO 8601 date to filter to
</ParamField>

<ParamField query="limit" type="number">
  Maximum number of results (default: 50, max: 100)
</ParamField>

<ParamField query="offset" type="number">
  Number of results to skip (for pagination)
</ParamField>

## Response

<ResponseField name="transactions" type="array">
  Array of transaction objects

  <Expandable title="Transaction object">
    <ResponseField name="id" type="string">
      Transaction ID
    </ResponseField>

    <ResponseField name="type" type="string">
      `charge`, `credit`, or `refund`
    </ResponseField>

    <ResponseField name="amountUsdCents" type="number">
      Amount in USD cents
    </ResponseField>

    <ResponseField name="amountSats" type="number">
      Amount in satoshis
    </ResponseField>

    <ResponseField name="description" type="string">
      Human-readable description
    </ResponseField>

    <ResponseField name="agentId" type="string">
      Agent that initiated the transaction
    </ResponseField>

    <ResponseField name="capability" type="string">
      Capability used (for charges)
    </ResponseField>

    <ResponseField name="provider" type="string">
      Provider used (for charges)
    </ResponseField>

    <ResponseField name="auditId" type="string">
      Audit log ID (for charges)
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.saturn-pay.com/v1/wallet/transactions?limit=20" \
    -H "Authorization: Bearer sk_agt_..."
  ```

  ```bash cURL (filter by date) theme={null}
  curl "https://api.saturn-pay.com/v1/wallet/transactions?startDate=2024-01-01&endDate=2024-01-31" \
    -H "Authorization: Bearer sk_agt_..."
  ```

  ```typescript Node.js theme={null}
  const response = await fetch('https://api.saturn-pay.com/v1/wallet/transactions', {
    headers: { 'Authorization': 'Bearer sk_agt_...' }
  });

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

  // Sum total spend
  const totalSpent = transactions
    .filter(tx => tx.type === 'charge')
    .reduce((sum, tx) => sum + tx.amountUsdCents, 0);

  console.log(`Total spent: $${(totalSpent / 100).toFixed(2)}`);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "transactions": [
      {
        "id": "tx_abc123",
        "type": "charge",
        "amountUsdCents": 15,
        "amountSats": 45,
        "description": "reason (openai/gpt-4o)",
        "agentId": "agt_xyz789",
        "capability": "reason",
        "provider": "openai",
        "auditId": "aud_def456",
        "createdAt": "2024-01-20T14:30:00Z"
      },
      {
        "id": "tx_def456",
        "type": "credit",
        "amountUsdCents": 1000,
        "amountSats": 30000,
        "description": "Card payment",
        "createdAt": "2024-01-20T10:00:00Z"
      }
    ],
    "total": 2,
    "limit": 50,
    "offset": 0
  }
  ```
</ResponseExample>
