---
title: "Get transaction history"
method: GET
path: "/api/credits/transactions"
tags: ["Credits"]
---

# Get transaction history

`GET /api/credits/transactions`

## Request

- Base URL: `https://api.zvid.io`
- URL: `https://api.zvid.io/api/credits/transactions`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Retrieve paginated list of credit transactions

## Query parameters

- `page` integer
- `limit` integer

## Response `200`

Transaction history retrieved successfully

- TransactionList
  - `transactions` Transaction[], required
    - `id` integer, required
    - `userId` integer, required
    - `amount` integer, required: Transaction amount (positive for additions, negative for deductions)
    - `transactionType` 'earned' | 'spent' | 'admin_adjustment' | 'credit_pack' | 'revoke' | 'plan_change_adjustment', required: Type of transaction
    - `creditSource` 'addon' | 'subscription', nullable: Credit pool affected by this transaction
    - `subscriptionCreditPeriodId` integer, nullable: Subscription credit period touched by this transaction, if applicable
    - `jobId` string, uuid, nullable: Related job ID (if applicable)
    - `description` string
    - `metadata` union
      - object
      - string
    - `createdAt` string, date-time, required
  - `pagination` object, required
    - `page` integer, required
    - `limit` integer, required
    - `total` integer, required
    - `totalPages` integer, required
    - `hasNext` boolean, required: Whether there are more pages after the current one
    - `hasPrev` boolean, required: Whether there are pages before the current one

## Other responses

- `400`: Invalid query parameters
- `401`: Unauthorized
- `500`: Internal server error

---

[API](https://skmtc.dev/zvid/apis/zvid-api.md) · [All operations](https://skmtc.dev/zvid/apis/zvid-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zvid/apis/zvid-api/revisions/8a665b293b37?raw)
