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

# Unenroll Payment Method

Unenroll a saved payment method for the user. Once you've done the POST to the unenrollment endpoint, the payment method status will be changed to UNENROLLED.

<Note>
  **Unenrollment Information**

  To unenroll the payment method, you need to provide the `payment_method_id`, which is the `vaulted_token` received when using the [Enroll Payment Method](#enroll-payment-method-api) endpoint.
</Note>


## OpenAPI

````yaml openapi/payment-methods-direct-workflow/unenroll-payment-method-api.json POST /customers/{customer_id}/payment-methods/{payment_method_id}/unenroll
openapi: 3.1.0
info:
  title: customer-api-register-payment-method
  version: 1.0.2
servers:
  - url: https://api-sandbox.y.uno/v1
security:
  - sec0: []
    sec1: []
    sec2: []
paths:
  /customers/{customer_id}/payment-methods/{payment_method_id}/unenroll:
    post:
      summary: Unenroll Payment Method
      operationId: unenroll-payment-method-api
      parameters:
        - name: customer_id
          in: path
          description: The unique identifier of the customer (UUID, 36 chars).
          schema:
            type: string
          required: true
        - name: payment_method_id
          in: path
          description: >-
            The unique identifier of the payment method. This is the
            `vaulted_token` received when enrolling a payment method using
            [Enroll Payment Method](/reference/enroll-payment-method-api) (UUID,
            36 chars).
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: cbdcc878-ceb4-4dd8-b0f0-49d444855de0
                    account_id: 493e9374-510a-4201-9e09-de669d75f256
                    name: VISA ****1111
                    description: VISA ****1111
                    type: CARD
                    category: CARD
                    country: US
                    status: UNENROLLED
                    created_at: '2024-06-06T13:32:49.715656Z'
                    updated_at: '2024-06-06T13:37:38.891106Z'
                    enrollment:
                      session: ''
                      sdk_required_action: true
                    provider:
                      id: YUNO
                      type: YUNO
                      provider_status: null
                    verify:
                      vault_on_success: false
                      payment: null
                    preferred: null
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: cbdcc878-ceb4-4dd8-b0f0-49d444855de0
                  account_id:
                    type: string
                    example: 493e9374-510a-4201-9e09-de669d75f256
                  name:
                    type: string
                    example: VISA ****1111
                  description:
                    type: string
                    example: VISA ****1111
                  type:
                    type: string
                    example: CARD
                  category:
                    type: string
                    example: CARD
                  country:
                    type: string
                    example: US
                  status:
                    type: string
                    example: UNENROLLED
                  created_at:
                    type: string
                    example: '2024-06-06T13:32:49.715656Z'
                  updated_at:
                    type: string
                    example: '2024-06-06T13:37:38.891106Z'
                  enrollment:
                    type: object
                    properties:
                      session:
                        type: string
                        example: ''
                      sdk_required_action:
                        type: boolean
                        example: true
                        default: true
                  provider:
                    type: object
                    properties:
                      id:
                        type: string
                        example: YUNO
                      type:
                        type: string
                        example: YUNO
                      provider_status: {}
                  verify:
                    type: object
                    properties:
                      vault_on_success:
                        type: boolean
                        example: false
                        default: true
                      payment: {}
                  preferred: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Bad Request:
                  value:
                    code: INVALID_REQUEST
                    messages:
                      - Invalid request
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_REQUEST
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid request
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: INVALID_CREDENTIALS
                    messages:
                      - Invalid credentials
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_CREDENTIALS
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid credentials
        '403':
          description: '403'
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    code: AUTHORIZATION_REQUIRED
                    messages:
                      - The merchant has no authorization to use this API.
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: AUTHORIZATION_REQUIRED
                  messages:
                    type: array
                    items:
                      type: string
                      example: The merchant has no authorization to use this API.
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: public-api-key
      x-default: <Your public-api-key>
    sec1:
      type: apiKey
      in: header
      x-default: <Your private-secret-key>
      name: private-secret-key
    sec2:
      type: apiKey
      in: header
      name: X-Idempotency-Key
      x-default: <Your X-Idempotency-Key>

````