# Delete card token

> Delete a saved payment method using the binding record ID returned by List saved tokens.

```yaml
openapi: 3.1.0
x-onerway-docs-version: v2
x-onerway-spec-key: payments/versions/v2/tokenization/delete-card-token
info:
  title: Delete card token
  version: v2
  description: Delete a saved payment method using the binding record ID returned
    by List saved tokens.
servers:
  - url: https://sandbox-payment-api.onerway.com
    description: sandbox
  - url: https://payment-api.onerway.com
    description: production
paths:
  /v1/txn/unbindCard:
    post:
      summary: Delete card token
      description: Delete a saved payment method using the binding record ID returned
        by List saved tokens.
      parameters:
        - name: ApiKey
          in: header
          required: true
          description: API key for the merchant account. Send it in the `ApiKey` request
            header. See
            [Authentication](/payments/versions/v2/get-started/authentication).
          schema:
            type: string
            description: API key for the merchant account. Send it in the `ApiKey` request
              header. See
              [Authentication](/payments/versions/v2/get-started/authentication).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. See
                    [Setup](/payments/versions/v2/get-started/setup#retrieve-your-credentials)
                    for how to obtain it.
                id:
                  type: string
                  description: "Binding record ID to delete. Get this value from
                    `data.tokenInfos[].id` in [List saved
                    tokens](/payments/versions/v2/api-reference/endpoints/list-\
                    saved-tokens). It is different from
                    `data.tokenInfos[].tokenId`: `tokenId` identifies the saved
                    payment token used for later token payments through [Create
                    direct
                    transaction](/payments/versions/v2/api-reference/endpoints/\
                    direct-create-transaction) and must not be submitted as this
                    `id`. After deletion succeeds, the associated token can no
                    longer be used for token payments."
              required:
                - merchantNo
                - id
            examples:
              delete-card-token:
                summary: Delete card token
                value:
                  id: example_card_binding_id
                  merchantNo: replace_with_merchant_no
      responses:
        "200":
          description: Card token deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Response code; `20000` means the request was processed
                      successfully, other values are error codes. See [Response
                      codes](/payments/versions/v2/api-reference/response-codes).
                  respMsg:
                    type: string
                    description: Human-readable message for the response code.
                  data:
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: Result of this unbind operation. `true` means the card token was
                          deleted and can no longer be used for token payments;
                          `false` means the unbind operation failed.
                      sign:
                        type: string
                        description: Response signature string. Onerway currently does not recommend
                          response signature verification by merchants.
                    description: Business data object carrying the result of this card-token
                      deletion request and the response signature.
              examples:
                card-token-deleted:
                  summary: Card token deleted
                  value:
                    respCode: "20000"
                    respMsg: Success
                    data:
                      success: true
                      sign: "{{SIGN}}"
      security:
        - apiKeyAuth:
            []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: ApiKey
```
