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

# Freeze Card

> Temporarily freeze a card to block all transactions. Card can be unfrozen later. POST /cards/{cardId}/freeze.

## Overview

Temporarily freeze a card to prevent any transactions. The card can be unfrozen later using the [Unfreeze Card](/v3/api-reference/cards/unfreeze) endpoint. The card balance is preserved while frozen.

## Path Parameters

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

## Example Usage

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

  $ch = curl_init('https://api.fyatu.com/api/v3/cards/' . $cardId . '/freeze');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_POST => true,
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . $accessToken
      ]
  ]);

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

  if ($result['success']) {
      echo "Card status: " . $result['data']['status'] . "\n";
  }
  ```

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

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

  const result = await response.json();
  if (result.success) {
    console.log('Card status:', result.data.status);
  }
  ```
</CodeGroup>

## Error Responses

| Status | Error Code        | Description                                      |
| ------ | ----------------- | ------------------------------------------------ |
| 400    | `CARD_TERMINATED` | Cannot freeze a terminated card                  |
| 409    | `ALREADY_FROZEN`  | Card is already frozen (auto-syncs local status) |
| 500    | `FREEZE_FAILED`   | Failed to freeze card at the bank partner        |

<Tip>
  Use card freezing for temporary security concerns. If a card is compromised or lost, freeze it immediately while you investigate.
</Tip>


## OpenAPI

````yaml v3/openapi.json POST /cards/{cardId}/freeze
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}/freeze:
    post:
      tags:
        - Cards
      summary: Freeze Card
      description: >-
        Temporarily freeze a card to prevent any transactions. The card can be
        unfrozen later.
      operationId: freezeCard
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Card frozen successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardStatusResponse'
              example:
                success: true
                status: 200
                message: Card frozen successfully
                data:
                  id: crd_8f3a2b1c4d5e6f7890abcdef12345678
                  status: FROZEN
                  frozenAt: '2026-01-17T10:00:00+00:00'
                  activatedAt: null
                meta:
                  requestId: req_a1b2c3d4e5f6
                  timestamp: '2026-01-17T10:00:00+00:00'
        '400':
          description: Card cannot be frozen
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                status: 400
                message: Cannot freeze a terminated card
                error:
                  code: CARD_TERMINATED
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Card is already frozen
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                status: 409
                message: Card is already frozen
                error:
                  code: ALREADY_FROZEN
        '500':
          description: Bank partner failed to freeze card
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                status: 500
                message: Bank partner failed to freeze card
                error:
                  code: FREEZE_FAILED
      security:
        - BearerAuth: []
components:
  schemas:
    CardStatusResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        status:
          type: integer
          example: 200
        message:
          type: string
        data:
          type: object
          properties:
            id:
              type: string
            status:
              type: string
              enum:
                - ACTIVE
                - FROZEN
                - TERMINATED
            frozenAt:
              type: string
              format: date-time
              nullable: true
            activatedAt:
              type: string
              format: date-time
              nullable: true
        meta:
          $ref: '#/components/schemas/Meta'
    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'
    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
    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

````