> ## Documentation Index
> Fetch the complete documentation index at: https://gnosispay-feat-v2-auth-module.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Card

> Cancels a card permanently. Once canceled, the card cannot be reactivated.
A new card must be issued. The card must belong to the authenticated user's
cardholder.



## OpenAPI

````yaml https://core.prod.gnosispay.com/user-api/openapi.json post /cards/{cardId}/cancel
openapi: 3.1.0
info:
  title: User Service
  version: 0.0.0
servers: []
security: []
tags:
  - name: Health
  - name: Auth
  - name: User
  - name: Cards
  - name: Phone
  - name: PCI
  - name: Terms
  - name: Source of Funds
paths:
  /cards/{cardId}/cancel:
    post:
      tags:
        - Cards
      summary: Cancel Card
      description: >-
        Cancels a card permanently. Once canceled, the card cannot be
        reactivated.

        A new card must be issued. The card must belong to the authenticated
        user's

        cardholder.
      operationId: Cards_cancelCard
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      responses:
        '204':
          description: Card canceled successfully
        '400':
          description: Bad Request - User has no cardholder
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardStatusBadRequestBody'
        '401':
          description: Unauthorized - Invalid JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found - User or card not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error - Failed to cancel card
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    uuid:
      type: string
      format: uuid
    CardStatusBadRequestBody:
      type: object
      oneOf:
        - $ref: '#/components/schemas/CardStatusValidationError'
        - $ref: '#/components/schemas/CardStatusBusinessError'
      discriminator:
        propertyName: kind
        mapping:
          validation:
            $ref: '#/components/schemas/CardStatusValidationError'
          business:
            $ref: '#/components/schemas/CardStatusBusinessError'
      description: >-
        Discriminated 400 body for card status routes. The `kind` field is
        additive

        and not a breaking change. Clients can keep reading `success` and
        `error`.
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    CardStatusValidationError:
      type: object
      required:
        - kind
        - success
        - error
      properties:
        kind:
          type: string
          enum:
            - validation
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ValidationErrorDetail'
    CardStatusBusinessError:
      type: object
      required:
        - kind
        - success
        - error
      properties:
        kind:
          type: string
          enum:
            - business
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    ValidationErrorDetail:
      type: object
      required:
        - name
        - message
      properties:
        name:
          type: string
          enum:
            - ValidationError
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````