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

# Terminate Card

> Permanently terminate a card. This action is irreversible. POST /cards/{id}/terminate. Requires cards:write scope.

## Overview

Permanently terminates a card. Once terminated:

* All future transactions are declined immediately
* Any remaining card balance is returned to the program ledger
* The card cannot be reactivated — issue a new card if needed

<Warning>
  Termination is **irreversible**. To temporarily block a card, use `POST /cards/{id}/freeze` instead. Only terminate when you are certain the card should never transact again.
</Warning>

## Safety Confirmation

To prevent accidental termination, the request body **must** include:

```json theme={null}
{ "confirm": "TERMINATE_CARD" }
```

Omitting this field or using any other value returns `400 CONFIRMATION_REQUIRED`.

## Path Parameters

| Parameter | Type   | Description                 |
| --------- | ------ | --------------------------- |
| `id`      | string | The card ID (prefix `crd_`) |

## Request Body

| Field     | Type   | Required | Value                              |
| --------- | ------ | -------- | ---------------------------------- |
| `confirm` | string | Yes      | Must be exactly `"TERMINATE_CARD"` |

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/terminate \
    -H "Authorization: Bearer $FYATU_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "confirm": "TERMINATE_CARD" }'
  ```

  ```javascript Node.js theme={null}
  const resp = await fetch(
    'https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/terminate',
    {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${process.env.FYATU_API_KEY}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ confirm: 'TERMINATE_CARD' })
    }
  );
  const body = await resp.json();
  console.log(body.data.status);       // "TERMINATED"
  console.log(body.data.terminatedAt); // "2026-05-26T10:00:00Z"
  ```

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

  resp = requests.post(
      'https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/terminate',
      headers={'Authorization': f'Bearer {os.environ["FYATU_API_KEY"]}'},
      json={'confirm': 'TERMINATE_CARD'}
  )
  card = resp.json()['data']
  print(card['status'])       # TERMINATED
  print(card['terminatedAt'])
  ```
</CodeGroup>

## Success Response (200)

Returns the terminated card object:

```json theme={null}
{
  "success": true,
  "status": 200,
  "message": "Card terminated",
  "data": {
    "id":             "crd_01HXYZ5555ABCDEF1111",
    "cardholderId":   "chl_01HXYZ1234ABCDEF5678",
    "productId":      "prd_01HXYZ7777ABCDEF3333",
    "status":         "TERMINATED",
    "cardType":       "VIRTUAL",
    "cardBrand":      "VISA",
    "maskedPan":      "**** **** **** 4242",
    "last4":          "4242",
    "expirationDate": "05/2029",
    "currency":       "USD",
    "terminatedAt":   "2026-05-26T10:00:00Z",
    "createdAt":      "2026-05-22T09:00:00Z",
    "updatedAt":      "2026-05-26T10:00:00Z"
  },
  "meta": {
    "requestId": "req_01HXY123456ABCDEF",
    "platform": "Fyatu CaaS",
    "timestamp": "2026-05-26T10:00:00Z"
  }
}
```

## Webhook

A `CARD_TERMINATED` event fires after successful termination:

```json theme={null}
{
  "event":      "CARD_TERMINATED",
  "eventId":    "evt_01HXY123456ABCDEF",
  "businessId": "BUS1A2B3C4D5E6F",
  "environment": "LIVE",
  "timestamp":  "2026-05-26T10:00:00Z",
  "data": {
    "cardId":       "crd_01HXYZ5555ABCDEF1111",
    "status":       "TERMINATED",
    "cardType":     "VIRTUAL",
    "cardholderId": "chl_01HXYZ1234ABCDEF5678"
  }
}
```

## Error Codes

| Code                            | HTTP | Cause                                                                        |
| ------------------------------- | ---- | ---------------------------------------------------------------------------- |
| `CONFIRMATION_REQUIRED`         | 400  | `confirm` field is missing or not `"TERMINATE_CARD"`                         |
| `CARD_NOT_FOUND`                | 404  | Card does not exist or belongs to another business/environment               |
| `CARD_ALREADY_TERMINATED`       | 409  | Card is already terminated                                                   |
| `CARD_HAS_PENDING_TRANSACTIONS` | 409  | Pending authorizations must clear before termination (typically 24–72 hours) |
| `INSUFFICIENT_SCOPE`            | 403  | Key lacks `cards:write` scope                                                |


## OpenAPI

````yaml v3.20/openapi.json POST /cards/{id}/terminate
openapi: 3.1.0
info:
  title: FYATU CaaS API v3.20
  description: >-
    FYATU Cards-as-a-Service API â€” API key authentication, Cardholder
    lifecycle, Card issuance, Transactions, Webhooks, and Programs.
  version: 3.20.0
  contact:
    name: FYATU Support
    url: https://fyatu.com
    email: support@fyatu.com
servers:
  - url: https://api.fyatu.com/api/v3.20
    description: >-
      FYATU CaaS API â€” the environment (LIVE or SANDBOX) is determined by the
      API key, not the URL
security:
  - BearerAuth: []
tags:
  - name: Meta
    description: Liveness, account info, and supported event types
  - name: Account
    description: Account-level balance and funding status
  - name: Programs
    description: Read card program configuration
  - name: Cardholders
    description: Create and manage cardholder profiles
  - name: Cards
    description: Issue, fund, freeze, and terminate virtual cards
  - name: Transactions
    description: Read-only card transaction history
  - name: Webhooks
    description: Manage webhook endpoints for real-time event delivery
  - name: Products
    description: Read card product configurations
paths:
  /cards/{id}/terminate:
    post:
      tags:
        - Cards
      summary: Terminate a card
      description: >-
        Permanently close a card. **Irreversible.** Must include `"confirm":
        "TERMINATE_CARD"` in the request body.
      operationId: terminateCard
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: crd_01HXYZ5555ABCDEF1111
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - confirm
              properties:
                confirm:
                  type: string
                  enum:
                    - TERMINATE_CARD
            example:
              confirm: TERMINATE_CARD
      responses:
        '200':
          description: Card terminated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardResponse'
              example:
                success: true
                status: 200
                message: Card terminated
                data:
                  id: crd_01HXYZ5555ABCDEF1111
                  cardholderId: chl_01HXYZ1234ABCDEF5678
                  productId: prd_01HXYZ7777ABCDEF3333
                  status: TERMINATED
                  cardType: VIRTUAL
                  cardBrand: VISA
                  maskedPan: '**** **** **** 4242'
                  last4: '4242'
                  expirationDate: 05/2029
                  currency: USD
                  terminatedAt: '2026-05-26T10:00:00Z'
                  createdAt: '2026-05-22T09:00:00Z'
                  updatedAt: '2026-05-26T10:00:00Z'
                meta:
                  requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
                  platform: Fyatu CaaS
                  timestamp: '2026-05-26T10:00:00Z'
        '400':
          description: Missing or wrong confirm value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                status: 400
                message: Confirmation required
                error:
                  code: CONFIRMATION_REQUIRED
                  detail: confirm must be "TERMINATE_CARD"
                meta:
                  requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
                  platform: Fyatu CaaS
                  timestamp: '2026-05-22T15:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Already terminated or has pending transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                alreadyTerminated:
                  value:
                    success: false
                    status: 409
                    message: Card is already terminated
                    error:
                      code: CARD_ALREADY_TERMINATED
                      detail: Card is already terminated
                    meta:
                      requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
                      platform: Fyatu CaaS
                      timestamp: '2026-05-22T15:00:00Z'
                pendingTxns:
                  value:
                    success: false
                    status: 409
                    message: Card has pending transactions
                    error:
                      code: CARD_HAS_PENDING_TRANSACTIONS
                      detail: Pending authorizations must clear before termination
                    meta:
                      requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
                      platform: Fyatu CaaS
                      timestamp: '2026-05-22T15:00:00Z'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CardResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        status:
          type: integer
          example: 200
        message:
          type: string
          example: Card retrieved
        data:
          $ref: '#/components/schemas/CardDetail'
        meta:
          $ref: '#/components/schemas/Meta'
      example:
        success: true
        status: 200
        message: Card retrieved
        data:
          id: crd_01HXYZ5555ABCDEF1111
          cardholderId: chl_01HXYZ1234ABCDEF5678
          productId: prd_01HXYZ1111ABCDEF0001
          status: ACTIVE
          cardType: VIRTUAL
          cardBrand: VISA
          maskedPan: 445123******4123
          last4: '4123'
          expirationDate: 06/2030
          balance: 100
          heldAmount: 53.88
          pendingAuthorizations:
            - merchantName: LOTUS'S 5121 CHALONG
              mcc: '5411'
              amount: 43.3
              currency: USD
              authorizedAt: '2026-07-08 14:32:10'
            - merchantName: NIRANAPA BOUTIQUE RESO
              mcc: '7011'
              amount: 9.52
              currency: USD
              authorizedAt: '2026-07-08 09:15:44'
          needsReissue: false
          currency: USD
          cvv: '123'
          features:
            has3DS: true
            hasApplePay: false
            hasGooglePay: false
            hasJIT: false
            hasSpendControl: true
            hasMccControl: false
            isReloadable: true
            isOneTimeUse: false
          spendingLimit: 1000
          spendingPeriod: DAILY
          billingAddress:
            address: 1234 Main St
            city: New York
            state: NY
            zipCode: '10001'
            country: US
          createdAt: '2026-05-26T10:00:00Z'
          updatedAt: '2026-05-26T10:00:00Z'
        meta:
          requestId: req_01HXY123456ABCDEF
          platform: Fyatu CaaS
          timestamp: '2026-05-26T10:00:00Z'
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        status:
          type: integer
          example: 422
        message:
          type: string
          example: Human readable message
        error:
          $ref: '#/components/schemas/ErrorBody'
        meta:
          $ref: '#/components/schemas/Meta'
    CardDetail:
      type: object
      description: >-
        Full card object returned by GET /cards/{id}. Includes live balance,
        full PAN, CVV, features, and billing address.
      properties:
        id:
          type: string
          example: crd_01HXYZ5555ABCDEF1111
        cardholderId:
          type: string
          example: chl_01HXYZ1234ABCDEF5678
        productId:
          type: string
          nullable: true
          example: prd_01HXYZ1111ABCDEF0001
        status:
          type: string
          enum:
            - ACTIVE
            - FROZEN
            - TERMINATED
          example: ACTIVE
        cardType:
          type: string
          enum:
            - VIRTUAL
            - PHYSICAL
          example: VIRTUAL
        cardBrand:
          type: string
          enum:
            - VISA
            - MASTERCARD
          example: VISA
        maskedPan:
          type: string
          nullable: true
          description: Populated after provisioning completes
          example: 445123******4123
        last4:
          type: string
          nullable: true
          description: Populated after provisioning completes
          example: '4123'
        pan:
          type: string
          nullable: true
          description: >-
            Full unmasked card number — only present when the card is
            provisioned at the provider
          example: '4451230000004123'
        expirationDate:
          type: string
          nullable: true
          description: Card expiry in MM/YYYY format
          example: 06/2030
        balance:
          type: number
          format: float
          nullable: true
          description: >-
            Available (spendable) card balance in USD fetched from the card
            provider, net of any pending authorization holds
          example: 100
        heldAmount:
          type: number
          format: float
          nullable: true
          description: >-
            Total value of pending authorization holds (liens) currently placed
            on the card. Funds are reserved but not yet settled. Available
            balance already excludes this amount.
          example: 53.88
        pendingAuthorizations:
          type: array
          nullable: true
          description: >-
            Individual pending authorization holds making up heldAmount. Each
            entry is a merchant authorization awaiting settlement or reversal.
          items:
            type: object
            properties:
              merchantName:
                type: string
                nullable: true
                description: Merchant that placed the hold
                example: LOTUS'S 5121 CHALONG
              mcc:
                type: string
                nullable: true
                description: Merchant category code
                example: '5411'
              amount:
                type: number
                format: float
                description: Held amount in USD
                example: 43.3
              currency:
                type: string
                description: Currency of the hold
                example: USD
              authorizedAt:
                type: string
                description: When the authorization was placed (UTC, YYYY-MM-DD HH:MM:SS)
                example: '2026-07-08 14:32:10'
        needsReissue:
          type: boolean
          nullable: true
          description: >-
            True when the provider flags the card for reissue (e.g. expired or
            compromised) and a replacement should be requested
          example: false
        currency:
          type: string
          example: USD
        cvv:
          type: string
          nullable: true
          description: Card verification value
          example: '123'
        features:
          type: object
          nullable: true
          properties:
            has3DS:
              type: boolean
              example: true
            hasApplePay:
              type: boolean
              example: false
            hasGooglePay:
              type: boolean
              example: false
            hasJIT:
              type: boolean
              example: false
            hasSpendControl:
              type: boolean
              example: true
            hasMccControl:
              type: boolean
              example: false
            isReloadable:
              type: boolean
              example: true
            isOneTimeUse:
              type: boolean
              example: false
        spendingLimit:
          type: number
          format: float
          nullable: true
          example: 1000
        spendingPeriod:
          type: string
          nullable: true
          example: DAILY
        billingAddress:
          type: object
          nullable: true
          properties:
            address:
              type: string
              example: 1234 Main St
            city:
              type: string
              example: New York
            state:
              type: string
              example: NY
            zipCode:
              type: string
              example: '10001'
            country:
              type: string
              example: US
        createdAt:
          type: string
          format: date-time
          example: '2026-05-26T10:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-05-26T10:00:00Z'
        frozenAt:
          type: string
          format: date-time
          nullable: true
          description: Present when status is FROZEN
          example: null
        terminatedAt:
          type: string
          format: date-time
          nullable: true
          description: Present when status is TERMINATED
          example: null
    Meta:
      type: object
      properties:
        requestId:
          type: string
          example: req_a1b2c3d4e5f6a7b8c9d0e1f2
        platform:
          type: string
          example: Fyatu CaaS
        timestamp:
          type: string
          format: date-time
          example: '2026-05-22T15:00:00Z'
    ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_ERROR
        detail:
          type: string
          example: dateOfBirth must be in YYYY-MM-DD format
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: API key missing
              value:
                success: false
                status: 401
                message: API key is required
                error:
                  code: AUTH_TOKEN_MISSING
                  detail: API key is required
                meta:
                  requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
                  platform: Fyatu CaaS
                  timestamp: '2026-05-22T15:00:00Z'
            invalid:
              summary: API key invalid
              value:
                success: false
                status: 401
                message: Invalid API key
                error:
                  code: AUTH_TOKEN_INVALID
                  detail: Invalid API key
                meta:
                  requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
                  platform: Fyatu CaaS
                  timestamp: '2026-05-22T15:00:00Z'
    Forbidden:
      description: Scope denied or business suspended
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            status: 403
            message: Scope denied
            error:
              code: INSUFFICIENT_SCOPE
              detail: This endpoint requires the cards:write scope
            meta:
              requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
              platform: Fyatu CaaS
              timestamp: '2026-05-22T15:00:00Z'
    NotFound:
      description: Resource not found or does not belong to your business
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimitExceeded:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            status: 429
            message: Rate limit exceeded
            error:
              code: RATE_LIMIT_EXCEEDED
              detail: Too many requests
            meta:
              requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
              platform: Fyatu CaaS
              timestamp: '2026-05-22T15:00:00Z'
    InternalError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            status: 500
            message: Internal error
            error:
              code: INTERNAL_ERROR
              detail: An unexpected error occurred
            meta:
              requestId: req_a1b2c3d4e5f6a7b8c9d0e1f2
              platform: Fyatu CaaS
              timestamp: '2026-05-22T15:00:00Z'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from the FYATU CaaS portal. Pass as `Authorization: Bearer
        <key>`.

````