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

# Disconnect user

> Revokes the user’s charging authorization and disconnects them from the paywall.

After this, any charge or request requiring payment will return a connection link instead of proceeding.




## OpenAPI

````yaml GET /user/disconnect
openapi: 3.1.0
info:
  title: Paywalls.ai API
  description: >
    The Paywalls.ai API enables developers to integrate monetization and access
    control for OpenAI-compatible LLMs.


    This proxy service supports multiple pricing strategies—including
    per-request, token-based, and subscription models—while maintaining full
    compatibility with the OpenAI API format.


    Requests are automatically checked for user authorization and balance. If
    the user is not connected to the paywall, or lacks sufficient balance, the
    API will return actionable links for onboarding or top-up.


    Use this API to monetize your AI-powered apps and services with minimal
    effort.


    Visit [paywalls.ai](https://docs.paywalls.ai) for full documentation and
    setup guides.
  version: 1.0.0
servers:
  - url: https://api.paywalls.ai/v1
    description: Primary production server
security:
  - ApiKeyAuth: []
tags:
  - name: Chat
    description: >
      OpenAI-compatible chat completion endpoint that enforces paywall logic
      before proxying the request to a model provider.


      Automatically checks user connection, balance, and performs charging.
      Supports streaming and non-streaming completions.
  - name: Models
    description: >
      Retrieve metadata and pricing information about the LLM models supported
      by the proxy.


      Includes prompt and completion pricing, per-request costs, and display
      details for UI integration.
  - name: User
    description: >
      Endpoints for managing user sessions, balance, and charging status.


      Includes functionality for connecting to or disconnecting from the
      paywall, checking balance, initiating top-ups, and issuing manual charges.
  - name: Webhooks
    description: >
      Manage webhook subscriptions and inspect delivery activity for your
      paywall integrations.
paths:
  /user/disconnect:
    get:
      tags:
        - User
      summary: Disconnect the user from the paywall
      description: >
        Revokes the user’s charging authorization and disconnects them from the
        paywall.


        After this, any charge or request requiring payment will return a
        connection link instead of proceeding.
      parameters:
        - $ref: '#/components/parameters/XPaywallUser'
        - in: query
          name: user
          required: false
          description: The unique identifier of the user to disconnect from the paywall.
          schema:
            type: string
      responses:
        '200':
          description: User is disconnected from the paywall.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the disconnection was successful.
                  message:
                    type: string
                    description: >-
                      A message indicating the result of the disconnection
                      operation.
components:
  parameters:
    XPaywallUser:
      name: X-Paywall-User
      in: header
      required: false
      schema:
        type: string
      description: >
        Optional user identifier provided by the developer.

        Can be used instead of the `user` property in the request body to
        associate the API call with a specific end user.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````