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

# Get Card Transactions

> Get transaction history for a specific card — merchant name, amount, status, and timestamps. GET /cards/{cardId}/transactions.

## Overview

Retrieve a paginated list of all transactions made with a specific card, including purchases, refunds, and funding operations.

## Path Parameters

| Parameter | Type   | Description                |
| --------- | ------ | -------------------------- |
| `cardId`  | string | The unique card identifier |

## Query Parameters

| Parameter | Type    | Description              |
| --------- | ------- | ------------------------ |
| `page`    | integer | Page number (default: 1) |

## Example Usage

<CodeGroup>
  ```php PHP theme={null}
  <?php
  $cardId = 'crd_8f3a2b1c4d5e6f7890abcdef12345678';

  $ch = curl_init("https://api.fyatu.com/api/v3/cards/{$cardId}/transactions?page=1");
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . $accessToken
      ]
  ]);

  $response = curl_exec($ch);
  $result = json_decode($response, true);

  if ($result['success']) {
      foreach ($result['data']['transactions'] as $txn) {
          $sign   = $txn['type'] === 'CREDIT' ? '+' : '-';
          $cat    = $txn['category'] ? "[{$txn['category']}] " : '';
          echo "{$cat}{$txn['merchant']}: {$sign}\${$txn['amount']} ({$txn['status']})\n";
          // e.g. "[Cross-border Fee] FACEBK *TQSR DUBLIN: -$0.50 (COMPLETED)"
      }

      if ($result['data']['pagination']['hasMore']) {
          echo "Page {$result['data']['pagination']['currentPage']} of {$result['data']['pagination']['totalPages']}\n";
      }
  }
  ```

  ```javascript Node.js theme={null}
  const cardId = 'crd_8f3a2b1c4d5e6f7890abcdef12345678';

  const response = await fetch(
    `https://api.fyatu.com/api/v3/cards/${cardId}/transactions?page=1`,
    { headers: { 'Authorization': `Bearer ${accessToken}` } }
  );

  const result = await response.json();

  if (result.success) {
    result.data.transactions.forEach(txn => {
      const sign = txn.type === 'CREDIT' ? '+' : '-';
      const cat  = txn.category ? `[${txn.category}] ` : '';
      console.log(`${cat}${txn.merchant}: ${sign}$${txn.amount} (${txn.status})`);
      // e.g. "[Cross-border Fee] FACEBK *TQSR DUBLIN: -$0.50 (COMPLETED)"
    });

    const { currentPage, totalPages, hasMore } = result.data.pagination;
    if (hasMore) console.log(`Page ${currentPage} of ${totalPages}`);
  }
  ```
</CodeGroup>

## Response Fields

| Field         | Type   | Description                                                                                                                                                          |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`          | string | Unique transaction identifier                                                                                                                                        |
| `type`        | string | `DEBIT` (purchases, fees) or `CREDIT` (funding, refunds)                                                                                                             |
| `amount`      | number | Transaction amount in USD                                                                                                                                            |
| `currency`    | string | Transaction currency (usually `USD`)                                                                                                                                 |
| `merchant`    | string | Merchant name                                                                                                                                                        |
| `logo`        | string | Merchant logo URL (nullable)                                                                                                                                         |
| `status`      | string | `COMPLETED`, `PENDING`, `DECLINED`, `REFUNDED`, `REVERSED`                                                                                                           |
| `description` | string | Network narration or payment code (e.g. `"Account verification"`)                                                                                                    |
| `category`    | string | Human-readable transaction category (e.g. `"Card Charge"`, `"Cross-border Fee"`, `"Card Funding"`). Use this to distinguish the actual payment from associated fees. |
| `createdAt`   | string | Transaction timestamp (`YYYY-MM-DD HH:MM:SS` UTC)                                                                                                                    |

## Category Values

| Value                         | Meaning                                                   |
| ----------------------------- | --------------------------------------------------------- |
| `Card Charge`                 | The actual merchant payment                               |
| `Cross-border Fee`            | International surcharge attached to a cross-border charge |
| `Card Funding`                | Balance top-up                                            |
| `Card Withdrawal`             | Balance unload                                            |
| `Refund`                      | Merchant refund                                           |
| `Reversal`                    | Transaction reversal                                      |
| `Declined`                    | Declined authorisation attempt                            |
| `Decline Fee (Domestic)`      | Fee for a declined domestic authorisation                 |
| `Decline Fee (International)` | Fee for a declined international authorisation            |

## Pagination

| Field         | Type    | Description                      |
| ------------- | ------- | -------------------------------- |
| `currentPage` | integer | Current page number              |
| `totalItems`  | integer | Total number of transactions     |
| `totalPages`  | integer | Total number of pages            |
| `hasMore`     | boolean | Whether more pages are available |

<Tip>
  When a single card payment generates two DEBIT entries with the same merchant (e.g. a Facebook charge of $1.00 followed by a $0.50 entry), the `category` field tells them apart: `"Card Charge"` is the actual payment and `"Cross-border Fee"` is the international surcharge. Always check `category` before rendering transaction labels in your UI.
</Tip>


## OpenAPI

````yaml v3/openapi.json GET /cards/{cardId}/transactions
openapi: 3.1.0
info:
  title: FYATU API v3
  description: >-
    FYATU API v3 with JWT authentication for Collections, Payouts, and Card
    Issuing.
  version: 3.0.0
  contact:
    name: FYATU Support
    url: https://fyatu.com
    email: support@fyatu.com
servers:
  - url: https://api.fyatu.com/api/v3
    description: Production
security: []
tags:
  - name: Authentication
    description: JWT token management endpoints
  - name: Account
    description: Business account, wallet, and address management
  - name: Collections
    description: Accept payments from customers via checkout sessions
  - name: Refunds
    description: Issue refunds for completed collections
  - name: Payouts
    description: Send money to Fyatu account holders
  - name: Cardholders
    description: Cardholder management for card issuing programs
  - name: Cards
    description: Issue, fund, freeze, and manage virtual cards
  - name: Webhooks
    description: Webhook configuration and management
paths:
  /cards/{cardId}/transactions:
    get:
      tags:
        - Cards
      summary: Get Card Transactions
      description: Retrieve a paginated list of all transactions made with a specific card.
      operationId: getCardTransactions
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
            maximum: 100
      responses:
        '200':
          description: Transactions retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardTransactionsResponse'
              example:
                success: true
                status: 200
                message: Transactions retrieved successfully
                data:
                  transactions:
                    - id: 8a7b6c5d4e3f2a1b0c9d8e7f
                      type: DEBIT
                      amount: 15.99
                      currency: USD
                      merchant: Netflix
                      logo: https://logos.ntropy.com/netflix.com
                      status: COMPLETED
                      description: NETFLIX.COM              LOS GATOS
                      category: Card Charge
                      createdAt: '2026-01-15 14:32:18'
                    - id: 1b2c3d4e5f6a7b8c9d0e1f2a
                      type: CREDIT
                      amount: 100
                      currency: USD
                      merchant: Card Funding
                      logo: https://logos.ntropy.com/consumer_icons-ATM_bank_deposit
                      status: COMPLETED
                      description: Mastercard Virtual dollar card funding
                      category: Card Funding
                      createdAt: '2026-01-14 09:15:42'
                    - id: 3c4d5e6f7a8b9c0d1e2f3a4b
                      type: DEBIT
                      amount: 49.99
                      currency: USD
                      merchant: Spotify
                      logo: https://logos.ntropy.com/spotify.com
                      status: COMPLETED
                      description: SPOTIFY PREMIUM          STOCKHOLM
                      category: Card Charge
                      createdAt: '2026-01-12 11:05:33'
                    - id: 5e6f7a8b9c0d1e2f3a4b5c6d
                      type: DEBIT
                      amount: 25
                      currency: USD
                      merchant: Card Withdrawal
                      logo: >-
                        https://logos.ntropy.com/consumer_icons-ATM_bank_withdrawal
                      status: COMPLETED
                      description: Mastercard Virtual dollar card unloading
                      category: Card Withdrawal
                      createdAt: '2026-01-10 16:48:21'
                  pagination:
                    currentPage: 1
                    totalItems: 47
                    totalPages: 3
                    hasMore: true
                meta:
                  requestId: req_a1b2c3d4e5f6g7h8
                  timestamp: '2026-01-17T12:00:00+00:00'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - BearerAuth: []
components:
  schemas:
    CardTransactionsResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        status:
          type: integer
          example: 200
        message:
          type: string
        data:
          type: object
          properties:
            transactions:
              type: array
              items:
                $ref: '#/components/schemas/CardTransaction'
            pagination:
              type: object
              properties:
                currentPage:
                  type: integer
                  description: Current page number
                totalItems:
                  type: integer
                  description: Total number of transactions
                totalPages:
                  type: integer
                  description: Total number of pages
                hasMore:
                  type: boolean
                  description: Whether more pages are available
        meta:
          $ref: '#/components/schemas/Meta'
    CardTransaction:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - DEBIT
            - CREDIT
            - FUNDING
            - UNLOAD
          description: >-
            Transaction type: DEBIT (purchase), CREDIT (refund), FUNDING, or
            UNLOAD
        amount:
          type: number
          description: Transaction amount in USD
        currency:
          type: string
          default: USD
        merchant:
          type: string
          description: Merchant name
        logo:
          type: string
          nullable: true
          description: Merchant logo URL
        status:
          type: string
          enum:
            - COMPLETED
            - PENDING
            - DECLINED
            - REFUNDED
            - REVERSED
          description: Transaction status
        description:
          type: string
          description: >-
            Network narration or payment code (e.g. Account verification,
            Approved or completed successfully)
        category:
          type: string
          description: >-
            Human-readable transaction category (e.g. Card Charge, Cross-border
            Fee, Card Funding). Use this to distinguish the actual payment from
            associated fees.
        createdAt:
          type: string
          format: date-time
          description: Transaction timestamp (YYYY-MM-DD HH:MM:SS UTC)
    Meta:
      type: object
      properties:
        requestId:
          type: string
          description: Unique request ID for tracking
          example: req_abc123def456
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the response
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        status:
          type: integer
          example: 401
        message:
          type: string
          example: Invalid credentials
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    Error:
      type: object
      properties:
        code:
          type: string
          description: Error code for programmatic handling
          example: AUTH_INVALID_CREDENTIALS
        details:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
          description: Validation error details (for VALIDATION_ERROR)
    ValidationError:
      type: object
      properties:
        field:
          type: string
          description: Field that failed validation
          example: appId
        message:
          type: string
          description: Validation error message
          example: AppId is required
  responses:
    Unauthorized:
      description: Authentication required or token invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            status: 401
            message: Unable to identify business
            error:
              code: AUTH_TOKEN_INVALID
            meta:
              requestId: req_abc123
              timestamp: '2026-01-05T10:30:00+00:00'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            status: 404
            message: Wallet not found
            error:
              code: RESOURCE_NOT_FOUND
            meta:
              requestId: req_abc123
              timestamp: '2026-01-05T10:30:00+00:00'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from /auth/token

````