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

# Stop an X402 session

> Stop the purchased browser without another payment. Authenticate with managementToken, not the browser token. An already closed or errored session also succeeds.

Use the `managementToken` returned when purchasing the session as a bearer token.
No additional payment or Hyperbrowser API key is required. See the
[X402 session guide](/docs/integrations/x402/sessions#get-session-status-and-stop-the-browser) for cURL examples.


## OpenAPI

````yaml openapi.json PUT /x402/session/{id}/stop
openapi: 3.0.1
info:
  title: Hyperbrowser API
  version: 1.0.0
servers:
  - url: https://api.hyperbrowser.ai
    description: Production server
security: []
paths:
  /x402/session/{id}/stop:
    put:
      summary: Stop an X402 session
      description: >-
        Stop the purchased browser without another payment. Authenticate with
        managementToken, not the browser token. An already closed or errored
        session also succeeds.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Purchased session ID.
      responses:
        '200':
          description: Success. No payment is required.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
        '400':
          description: Invalid session ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, invalid, expired, or incorrectly scoped management token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The token authorizes a different session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found for the token's session and team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Session lookup or stop failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - X402SessionManagement: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    X402SessionManagement:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        The managementToken from the X402 session purchase response. Valid for
        24 hours and scoped to that session; no API key or further payment is
        required.

````

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