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

# Revoke Payment Method

> Revokes (detaches) a saved payment method so it can no longer be used for delegated payments. Requires a Nevermined API key.



## OpenAPI

````yaml DELETE /payment-methods/{paymentMethodId}
openapi: 3.1.0
info:
  title: Nevermined API
  description: >-
    API for managing AI agents, payment plans, and x402 payments in the
    Nevermined ecosystem.


    ## Prerequisites


    You need a Nevermined API Key to authenticate. Get one at
    [nevermined.app](https://nevermined.app) under **Settings > API Keys**.


    See the [5-Minute Setup Guide](/docs/integrate/quickstart/5-minute-setup)
    for detailed instructions.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.sandbox.nevermined.app/api/v1
    description: Sandbox (Testing) - Base Sepolia
  - url: https://api.live.nevermined.app/api/v1
    description: Live (Production) - Base Mainnet
security:
  - bearerAuth: []
tags:
  - name: Protocol - Agents
    description: Endpoints for registering and managing AI agents
  - name: Protocol - Plans
    description: Endpoints for creating and managing payment plans
  - name: Protocol - Credits
    description: Endpoints for minting and redeeming credits
  - name: Protocol - Access
    description: Endpoints for access tokens and request validation
  - name: X402 - Permissions
    description: Endpoints for x402 delegated permissions
paths:
  /payment-methods/{paymentMethodId}:
    delete:
      tags:
        - Payment Methods
      summary: Revoke a payment method
      description: >-
        Revokes (detaches) a saved payment method so it can no longer be used
        for delegated payments. Requires a Nevermined API key.
      operationId: PaymentMethodsController_revokePaymentMethod
      parameters:
        - name: paymentMethodId
          required: true
          in: path
          description: Identifier of the payment method to revoke
          schema:
            type: string
            example: pm_1Abc2Def3Ghi4Jkl
      responses:
        '200':
          description: Payment method revoked
          content:
            application/json:
              schema:
                example:
                  success: true
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Payment method does not exist
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Nevermined API Key (starts with 'nvm:'). Get one at
        [nevermined.app](https://nevermined.app) under **Settings > API Keys**.

````

## Related topics

- [Update Payment Method](/docs/api-reference/payment-methods/update-payment-method.md)
- [List Payment Methods](/docs/api-reference/payment-methods/list-payment-methods.md)
- [Monetize Your AI](/docs/solutions/agent-to-agent-monetization.md)
- [Revoke Delegation](/docs/api-reference/delegation/revoke-delegation.md)
- [Revoke Permission](/docs/api-reference/x402/revoke-permission.md)
