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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Désinscrire un moyen de paiement

> Désinscrit un moyen de paiement enregistré d'un client et définit son statut sur UNENROLLED

Désinscrivez un moyen de paiement enregistré pour l'utilisateur. Une fois le POST envoyé à l'endpoint de désinscription, le statut du moyen de paiement passe à UNENROLLED.

> [!NOTE]
>
> **Informations sur la désinscription**
>
> Pour désinscrire le moyen de paiement, vous devez fournir le `payment_method_id`, qui est le `vaulted_token` reçu lors de l'utilisation de l'endpoint [Enroll Payment Method](https://docs.y.uno/fr/reference/payment-methods-direct-workflow/enroll-payment-method-api.md).


## OpenAPI

````yaml openapi/fr/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
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
    sec2: []
paths:
  /customers/{customer_id}/payment-methods/{payment_method_id}/unenroll:
    post:
      summary: Désinscrire un moyen de paiement
      operationId: unenroll-payment-method-api
      parameters:
        - name: customer_id
          in: path
          description: L'identifiant unique du client (UUID, 36 caractères).
          schema:
            type: string
          required: true
        - name: payment_method_id
          in: path
          description: >-
            L'identifiant unique du moyen de paiement. Il s'agit du
            `vaulted_token` reçu lors de l'inscription d'un moyen de paiement
            avec [Inscrire un moyen de
            paiement](/fr/reference/payment-methods-direct-workflow/enroll-payment-method-api)
            (UUID, 36 caractères).
          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
                    idempotency_key: f8f624e9-0621-4775-8f58-5194024008b2
                    parent_type: null
                    sub_status: null
                    vaulted_token: 3727b020-b1d3-4fe6-884e-31a5354a8c20
                    callback_url: null
                    action: FORM
                    redirect_url: null
                    card_data:
                      iin: '41111111'
                      lfd: '1111'
                      holder_name: JOHN DOE
                      expiration_month: 12
                      expiration_year: 26
                      number_length: 16
                      security_code_length: 3
                      brand: VISA
                      issuer: CONOTOXIA SP Z O O
                      issuer_code: null
                      country_code: PL
                      category: CLASSIC
                      type: DEBIT
                      stored_credentials:
                        reason: null
                        usage: null
                        subscription_agreement_id: null
                        network_transaction_id: '108114113107103'
                        transaction_link_id: null
                      fingerprint: ba4d6817-adf4-47b1-8ae4-41a934e9e512
                    last_successfully_used: null
                    last_successfully_used_at: 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: {}
                  idempotency_key:
                    type: string
                    example: f8f624e9-0621-4775-8f58-5194024008b2
                    description: Clé d'idempotence.
                  parent_type:
                    nullable: true
                    description: Type parent.
                  sub_status:
                    nullable: true
                    description: Sous-statut.
                  vaulted_token:
                    type: string
                    example: 3727b020-b1d3-4fe6-884e-31a5354a8c20
                    description: Token mis en coffre.
                  callback_url:
                    nullable: true
                    description: URL de callback.
                  action:
                    type: string
                    example: FORM
                    description: Action.
                  redirect_url:
                    nullable: true
                    description: URL de redirection.
                  card_data:
                    type: object
                    properties:
                      iin:
                        type: string
                        example: '41111111'
                      lfd:
                        type: string
                        example: '1111'
                      holder_name:
                        type: string
                        example: JOHN DOE
                      expiration_month:
                        type: integer
                        example: 12
                      expiration_year:
                        type: integer
                        example: 26
                      number_length:
                        type: integer
                        example: 16
                      security_code_length:
                        type: integer
                        example: 3
                      brand:
                        type: string
                        example: VISA
                      issuer:
                        type: string
                        example: CONOTOXIA SP Z O O
                      issuer_code:
                        nullable: true
                      country_code:
                        type: string
                        example: PL
                      category:
                        type: string
                        example: CLASSIC
                      type:
                        type: string
                        example: DEBIT
                      stored_credentials:
                        type: object
                        properties:
                          reason:
                            nullable: true
                          usage:
                            nullable: true
                          subscription_agreement_id:
                            nullable: true
                          network_transaction_id:
                            type: string
                            example: '108114113107103'
                          transaction_link_id:
                            nullable: true
                      fingerprint:
                        type: string
                        example: ba4d6817-adf4-47b1-8ae4-41a934e9e512
                    description: Données de la carte.
                  last_successfully_used:
                    nullable: true
                    description: Dernière utilisation réussie.
                  last_successfully_used_at:
                    nullable: true
                    description: Date de la dernière utilisation réussie.
        '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>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.