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

# Delete card token

> scopes:
- admin:checkout




## OpenAPI

````yaml /mintlify-docs/openapi/spec-payments-v2.yaml delete /accounts/{aid}/payments/card-tokens/{token_id}
openapi: 3.0.0
info:
  title: Payments API v2
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: |
    Public endpoints for payments served under the account-scoped URL format
    `https://api.dintero.com/v1/accounts/{aid}/...`.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
servers:
  - url: https://api.dintero.com/v1
security:
  - JWT: []
tags:
  - name: Transactions
    x-displayName: Transactions
    description: |
      View and perform operations on transactions
  - name: session
    x-displayName: Sessions
    description: |
      A Checkout Session relates to an order in your system.
      When an order has been placed you create a corresponding Checkout Session
      to receive payment for that order.
  - name: payment
    x-displayName: Payment
    description: |
      Resources used by the customer aka user to complete the payment of a
      session.
  - name: settlements
    x-displayName: Settlement reports
    description: Get settlement reports generated per payout
  - name: settlements.configuration
    x-displayName: Configuration
    description: Configure settlement reports
  - name: reports
    x-displayName: Reports
    description: List the generated monthly transaction reports
  - name: example-session-callbacks
    x-displayName: Callback
    description: |
      Example of recieved callbacks from Dintero's servers.
  - name: fund-transfers
    x-displayName: Fund Transfer
    description: Transfer funds between sellers
  - name: Sellers
    x-displayName: Sellers
    description: Manage the signup of a new Seller / Merchant account
  - name: example-session-callbacks
    x-displayName: Example Callbacks
    description: Example of callbacks delivered
  - name: v2-fund-transfers
    x-displayName: Fund Transfer
    description: Transfer funds between sellers
  - name: v2-config-payout-destinations
    x-displayName: Sellers
    description: Get payout data for sellers
paths:
  /accounts/{aid}/payments/card-tokens/{token_id}:
    parameters:
      - $ref: '#/components/parameters/accountId'
    delete:
      tags:
        - Card Tokens
      summary: card_tokens_token_id_delete
      description: |
        scopes:
        - admin:checkout
      operationId: card_tokens_token_id_delete
      parameters:
        - name: token_id
          in: path
          required: true
          description: >
            The `payment_token_id` or `recurrence_token_id` for the token to
            delete.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  maxLength: 128
                  description: Short description of the reason for the token deletion.
                  example: Profile deleted
                requestor:
                  type: string
                  enum:
                    - CARDHOLDER
                    - MERCHANT
                  default: MERCHANT
                  description: Entity initiating the token deletion.
                  example: MERCHANT
        required: true
      responses:
        '200':
          description: Card Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardTokenRead'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - JWT: []
        - apikey: []
components:
  parameters:
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
  schemas:
    CardTokenRead:
      type: object
      allOf:
        - $ref: '#/components/schemas/CardToken'
        - required:
            - account_id
            - created_at
            - updated_at
          properties:
            account_id:
              type: string
              pattern: ^[PT]{1}\d{8}$
              minLength: 9
              maxLength: 9
            created_at:
              type: string
              format: date-time
            created_by:
              type: string
            updated_at:
              type: string
              format: date-time
            deleted_at:
              type: string
              format: date-time
            deleted_by:
              type: string
    CardToken:
      type: object
      required:
        - id
        - payment_product_type
        - type
        - status
        - card_brand
      properties:
        id:
          type: string
        token:
          type: string
        type:
          type: string
          enum:
            - payment_token
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - SUSPENDED
            - CANCELLED
            - DELETED
        card_brand:
          type: string
          enum:
            - visa
            - mastercard
        masked_pan:
          type: string
          example: 476173******0416
        pan_expiry_date:
          type: string
          format: \d{2}/\d{4}
          example: 09/2030
        token_expiry_date:
          type: string
          format: \d{2}/\d{4}
          example: 09/2030
        links:
          type: array
          items:
            type: object
            required:
              - href
              - rel
            properties:
              href:
                type: string
              rel:
                type: string
                enum:
                  - digital_card_art
                  - digital_card_art_background
                  - card_symbol
                  - terms_and_conditions
              mime_type:
                type: string
                enum:
                  - image/png
                  - image/pdf
                  - text/plain
                  - text/html
        customer_id:
          type: string
        account_id:
          type: string
          example: P12345678
        relationship_id:
          type: string
          description: >
            Reference to the merchant entity for which the token is dedicated.

            Merchant-dedicated tokens are uniquely created per
            merchant_relationship_id.
        transaction_id:
          type: string
          format: checkout-id
          description: |
            Reference to the transaction where the token was created
        external_token_references:
          type: array
          items:
            type: string
          description: |
            External references to migrated card tokens
        payment_product_type:
          type: string
          example: dintero_psp.creditcard
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
  responses:
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AccessForbidden:
      description: Access forbidden, invalid JWT token was used
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    JWT:
      type: http
      description: >
        Bearer authentication (token authentication) should be used for
        accessing the API.


        Use [Get Token](/api-reference/authenticate/aid_auths_oauth_token_post)
        to get an access token for client credentials.

        Pass the token in the request header:

            Authorization: Bearer {access_token}

        where the **access_token** is JSON Web Tokens (JWT).
      scheme: bearer
      bearerFormat: JWT
    apikey:
      type: apiKey
      in: header
      description: >
        X-API-Key authentication for accessing regular endpoints. Use

        [Create api-key](/checkout-api/api-keys/admin_api_keys_post) to create a
        key.


        The content of the header should look like the following:

            x-api-key: {api_key}
      name: x-api-key

````