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

# Remove a payment method

> Deactivates the payment method so it can no longer be attached to autopay or payments. The record remains visible (with `is_active: false`) so historical payments stay auditable. Returns 409 if an active or paused autopay schedule still uses it — cancel the schedule first. Idempotent.



## OpenAPI

````yaml /api-reference/external_api.openapi.json delete /payment-methods/{payment_method_id}
openapi: 3.1.0
info:
  title: Monterey External Reporting API
  description: >-
    Org-scoped, API-key-authenticated reporting endpoints for Monterey Financial
    clients.
  version: 0.1.0
servers:
  - url: https://api.montereyfinancial.app
    description: Production
security:
  - BearerApiKey: []
paths:
  /payment-methods/{payment_method_id}:
    delete:
      tags:
        - Payment Methods
      summary: Remove a payment method
      description: >-
        Deactivates the payment method so it can no longer be attached to
        autopay or payments. The record remains visible (with `is_active:
        false`) so historical payments stay auditable. Returns 409 if an active
        or paused autopay schedule still uses it — cancel the schedule first.
        Idempotent.
      operationId: delete_payment_method_payment_methods__payment_method_id__delete
      parameters:
        - name: payment_method_id
          in: path
          required: true
          schema:
            type: string
            title: Payment Method Id
      responses:
        '204':
          description: Successful Response
        '401':
          description: Missing or invalid API key.
        '404':
          description: Resource not in scope or does not exist.
        '409':
          description: An active or paused autopay schedule still uses this payment method.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerApiKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      description: >-
        Parameter-validation error (HTTP 422). `detail` lists each violated
        constraint with its location, message, and type.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
      description: >-
        A single parameter-validation failure: `loc` is the path to the
        offending input, `msg` is human-readable, and `type` is the rule that
        failed.
  securitySchemes:
    BearerApiKey:
      type: http
      description: Static API key issued via the client portal. Treat it like a password.
      scheme: bearer
      bearerFormat: ApiKey

````