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

# Cancelar inscripción de método de pago

> Cancela la inscripción de un método de pago guardado, marcándolo como inactivo para futuras transacciones

Cancela la inscripción de un método de pago guardado previamente para un cliente.

Para realizar esta acción, proporciona el `payment_method_id` en la ruta de la solicitud. Cuando la solicitud sea exitosa, el estado del método de pago se actualizará a `UNENROLLED`, lo que lo deja inactivo y ya no disponible para futuras transacciones.


## OpenAPI

````yaml openapi/es/payment-methods-checkout/unenroll-payment-method-checkout.json POST /customers/payment-methods/{payment_method_id}/unenroll
openapi: 3.1.0
info:
  title: customer-api
  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: []
paths:
  /customers/payment-methods/{payment_method_id}/unenroll:
    post:
      summary: Anular la inscripción de un método de pago
      operationId: unenroll-payment-method-checkout
      parameters:
        - name: payment_method_id
          in: path
          description: >-
            El id del método de pago cuya inscripción se anula (UUID, 36
            caracteres).
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 77ee4a02-da3e-4a11-ac15-ba69e1813475
                    idempotency_key: null
                    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:28:57.149530Z'
                    updated_at: '2024-06-06T13:31:13.945554Z'
                    enrollment:
                      session: 0685f1d6-11ff-4992-abc3-9eea1842205c
                      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: 77ee4a02-da3e-4a11-ac15-ba69e1813475
                  idempotency_key: {}
                  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:28:57.149530Z'
                  updated_at:
                    type: string
                    example: '2024-06-06T13:31:13.945554Z'
                  enrollment:
                    type: object
                    properties:
                      session:
                        type: string
                        example: 0685f1d6-11ff-4992-abc3-9eea1842205c
                      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:
                Unauthorized:
                  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
      name: private-secret-key
      x-default: <Your private-secret-key>

````

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