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

# Delete a PIX key for a specific merchant

> Requires the merchant.pix.delete permission.

Deletes a PIX key for a merchant that belongs to the authenticated organization.
The key will be unregistered from the provider and marked as deleted in the system.
A `PENDING_VERIFICATION` key never reached the provider, so it is deleted at once and
its code stops working.




## OpenAPI

````yaml /api-spec.yaml delete /v1/merchants/{merchantId}/pix/keys
openapi: 3.1.0
info:
  title: Rinne API
  version: 1.0.0
  description: >
    **Rinne API** is a robust payment platform that offers integration with
    multiple payment providers.


    ## Authentication


    The API uses API Key authentication via the `x-api-key` header. Each company
    has a unique key to access resources.


    ## Response Format


    All responses follow a consistent format:

    - **Success**: Returns the requested data directly

    - **Error**: Returns an `error` object with detailed information


    ## Pagination


    Endpoints that return lists support pagination through parameters:

    - `page`: Page number (default: 1)

    - `limit`: Items per page (default: 20, maximum: 100)


    ## Supported Providers


    The API supports multiple payment providers:

    - **Rinne**: Internal provider

    - **Celcoin**: PIX integration and other financial services


    ## Raw Card Data (PCI Endpoints)


    Card credential fields (`card_data.number`, `card_data.cvv`,
    `card_data.network_token`,

    `card_data.cryptogram`, and the 3DS `card.number`) must always be sent
    encrypted —

    values start with the `ev:` prefix. Plaintext values are rejected with

    `400 VALIDATION_ERROR` on every host.


    There are two ways to send encrypted values:

    - **rinne-js**: card forms and wallet buttons (Apple Pay / Google Pay)
    encrypt
      credentials client-side before they leave the browser.
    - **PCI API host**: server-to-server integrations that handle raw card data
    must call
      `https://pci.api.rinne.com.br/core` (sandbox: `https://pci.api-sandbox.rinne.com.br/core`)
      instead of the regular host. This endpoint encrypts `number` and `cvv` in transit
      before the request reaches the API; all other fields pass through unchanged.

    The PCI host serves only transaction creation and 3DS session creation (both
    the

    self and merchant variants); use the regular host for everything else.
  contact:
    name: Rinne API Support
    email: suporte@rinne.com.br
servers:
  - url: https://api-sandbox.rinne.com.br/core
    description: Sandbox
  - url: https://api.rinne.com.br/core
    description: Production
security: []
tags:
  - name: System
    description: System and API health endpoints
  - name: Tap-on-Phone
    description: Access-token minting for the Tap-on-Phone SDK (called from your backend)
  - name: Management
    description: >-
      Merchant management endpoints - create, list, get specific, overview,
      update
  - name: Transactions
    description: Transaction operations for merchants - create, list, overview, refunds
  - name: Affiliations
    description: Affiliation management for merchants
  - name: Biometric Verifications
    description: Biometric verifications of your merchants' contacts
  - name: Onboarding Requirements
    description: What your merchants must prove to a provider, and how far along they are
  - name: Onboarding Documents
    description: Documents uploaded for your merchants
  - name: KYC
    description: KYC check history of your merchants
  - name: Banking
    description: Banking operations for merchants - balance, cashout, statements
  - name: Bank Accounts
    description: Bank account management for merchants
  - name: Pix Keys
    description: PIX key management for merchants
  - name: Company Transactions
    description: Direct transaction management and query endpoints for companies
  - name: Companies
    description: Company management
  - name: Company Affiliations
    description: Payment provider affiliation management
  - name: Company Biometric Verifications
    description: Biometric verifications of the company contact
  - name: Company Onboarding Requirements
    description: What the company must prove to a provider, and how far along it is
  - name: Company Onboarding Documents
    description: Documents the company uploads for its onboarding
  - name: Company Banking
    description: Company banking endpoints (balance, etc.)
  - name: Company Pix
    description: Company PIX key management
  - name: Company Ledger
    description: Company ledger entry query endpoints
  - name: Company Disputes
    description: Company dispute query endpoints
  - name: Company Receivables
    description: Contract effects on the company's own receivables
  - name: Ledger
    description: Ledger entry query endpoints (company and merchants)
  - name: Disputes
    description: Dispute query endpoints for an organization's merchants
  - name: Receivables
    description: Contract effects on an organization's merchants' receivables
  - name: Cards
    description: Stored card management (self and merchant)
  - name: Webhooks
    description: Endpoints for receiving webhooks from external providers
  - name: Pricing
    description: Fee and cost policy management for transaction pricing
  - name: Users
    description: User management endpoints
  - name: Roles
    description: Role management endpoints
  - name: Permissions
    description: Permission management endpoints
paths:
  /v1/merchants/{merchantId}/pix/keys:
    delete:
      tags:
        - Pix Keys
      summary: Delete a PIX key for a specific merchant
      description: >
        Requires the merchant.pix.delete permission.


        Deletes a PIX key for a merchant that belongs to the authenticated
        organization.

        The key will be unregistered from the provider and marked as deleted in
        the system.

        A `PENDING_VERIFICATION` key never reached the provider, so it is
        deleted at once and

        its code stops working.
      parameters:
        - in: path
          name: merchantId
          required: true
          schema:
            type: string
          description: The merchant ID
          example: 123e4567-e89b-12d3-a456-426614174000
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePixKey'
      responses:
        '204':
          description: PIX key deleted successfully
        '400':
          description: >
            `error.code` says why:


            - `VALIDATION_ERROR` - `key` or `provider` is missing or invalid, or
            the
              affiliation has no banking account; `details.issues` names the field.
            - `INVALID_STATE_ERROR` - the account is blocked by the provider's
            risk controls.

            - `BAD_REQUEST_ERROR` - the provider refused the deletion for
            another reason;
              the key keeps its status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorResponse'
        '403':
          description: Insufficient permissions to access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationErrorResponse'
        '404':
          description: >-
            Merchant not found or does not belong to authenticated organization,
            or PIX key not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '409':
          description: >
            The key cannot be deleted right now. `error.code` says why:


            - `PIX_KEY_UNDER_CLAIM` - a claim on the key is in progress; wait
            for
              it to be resolved.
            - `CONFLICT_ERROR` - a concurrent write changed the PIX key during
              deletion; re-read it and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
        '502':
          description: >-
            The provider did not answer; the key keeps its status. Retry the
            delete.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DeletePixKey:
      type: object
      required:
        - key
        - provider
      properties:
        key:
          type: string
          minLength: 1
          description: Pix key to delete
          example: user@example.com
        provider:
          type: string
          enum:
            - CELCOIN
          minLength: 1
          description: >-
            Provider name (accepts lowercase and uppercase, returns uppercase).
            Only `CELCOIN` offers Pix. `RINNE` and `CAPPTA` are left out of this
            enum: sent anyway, they delete nothing and answer `404` or `400`.
          example: CELCOIN
    ErrorResponse:
      type: object
      description: >
        Standard error envelope. Use it where an operation can fail with more
        than one

        error code: the shape is always the same and `error.code` identifies the
        failure.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - status
            - timestamp
          properties:
            code:
              type: string
              description: Machine-readable error code to branch on.
              example: INSUFFICIENT_BALANCE_ERROR
            message:
              type: string
              example: >-
                Insufficient balance: 20000 is less than the minimum required:
                100000
            status:
              type: integer
              example: 400
            details:
              type: object
              description: >
                Error-specific context. Returned for a `VALIDATION_ERROR` that
                names

                the request's own invalid fields (carrying `issues`, see

                `ValidationErrorResponse`) and, on the operations whose

                `409` names the row it conflicts with, the identifier that
                operation

                documents (for example `details.pending_verification_id`), and
                for

                `REFUND_NOT_ALLOWED`, the refused rule in `details.reason`.
                Absent

                otherwise.
            path:
              type: string
              example: /v1/banking/cashouts
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    AuthenticationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: AUTHENTICATION_ERROR
            message:
              type: string
              example: Authentication required to access this resource
            status:
              type: integer
              example: 401
            details:
              type: object
              properties:
                reason:
                  type: string
                  example: Invalid API key
            path:
              type: string
              example: /companies/me
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    AuthorizationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: AUTHORIZATION_ERROR
            message:
              type: string
              example: You need 'admin' permissions to access this resource
            status:
              type: integer
              example: 403
            path:
              type: string
              example: /companies
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    NotFoundErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: RESOURCE_NOT_FOUND
            message:
              type: string
              example: Company with ID '123' not found
            status:
              type: integer
              example: 404
            path:
              type: string
              example: /companies/me
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    InternalServerErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INTERNAL_SERVER_ERROR
            message:
              type: string
              example: An unexpected error occurred
            status:
              type: integer
              example: 500
            path:
              type: string
              example: /companies
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    IntegrationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INTEGRATION_ERROR
            message:
              type: string
              example: Integration error with provider CELCOIN
            status:
              type: integer
              example: 502
            path:
              type: string
              example: /merchants/{merchantId}/balance
            timestamp:
              type: string
              format: date-time
            requestId:
              type: string
            details:
              type: object
              additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Company API key for authentication

````

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