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

# Get balance

> Read what the account can spend. available is the plan, voucher and purchased balances less the cost of sessions still running; at zero or below, requests that cost money answer 402 insufficient_balance: every start and scrape on an on-demand plan, premium proxy starts, scrapes and captcha solving in a new session on a reserved plan. Money is in USD as decimal strings. See [statistics](/api-reference#statistics).



## OpenAPI

````yaml /api-reference/openapi.json get /billing/balance
openapi: 3.1.0
info:
  title: Surfsky API
  version: 0.1.0
  description: >-
    Start cloud browsers, control them through CDP, and manage the profiles,
    proxies, and fingerprints they run with.
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://YOUR_API_HOST
        description: API base URL from your Surfsky dashboard, including https://.
security:
  - ApiToken: []
tags:
  - name: scrape
    description: >-
      Fetch one page through a browser that is already running: a residential
      proxy and a desktop fingerprint, nothing kept between requests.
  - name: profiles
    description: >-
      Start, stop, and manage browsers. A one-time profile is discarded when it
      stops; a persistent profile keeps its cookies, storage, and fingerprint
      according to its storage settings.
  - name: proxies
    description: >-
      Look up available proxy locations and check traffic quotas for the premium
      and shared pools.
  - name: fingerprints
    description: >-
      Look up accepted renderer, screen, and device model values before
      configuring a fingerprint.
  - name: extensions
    description: Upload Chrome extensions once and load them into any browser you start.
  - name: billing
    description: >-
      Read the balance, the receipt of every session and scrape, usage over time
      windows and the ledger of charges and top-ups.
  - name: site-reports
    description: Tell the Surfsky team about a website that keeps blocking your browsers.
paths:
  /billing/balance:
    get:
      tags:
        - billing
      summary: Get balance
      description: >-
        Read what the account can spend. available is the plan, voucher and
        purchased balances less the cost of sessions still running; at zero or
        below, requests that cost money answer 402 insufficient_balance: every
        start and scrape on an on-demand plan, premium proxy starts, scrapes and
        captcha solving in a new session on a reserved plan. Money is in USD as
        decimal strings. See [statistics](/api-reference#statistics).
      operationId: billing_balance_billing_balance_get
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Balance'
        '401':
          description: Missing or invalid API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Account or feature access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    Balance:
      type: object
      properties:
        success:
          type: boolean
        msg:
          type: string
        data:
          type: object
          properties:
            on_demand:
              type: boolean
              description: >-
                True when browser time is paid from the balance. False on a
                reserved plan: the monthly fee covers browser time and the
                balance pays premium traffic and captcha solves.
            plan:
              type: string
              description: Plan name.
            plan_balance:
              type: string
              description: >-
                Credit granted with each paid period of an on-demand plan; spent
                first.
            voucher_balance:
              type: string
              description: >-
                Promotional credit, spent after plan credit; "0" once
                voucher_expires_at has passed.
            purchased_balance:
              type: string
              description: Money from top-ups and refunds, spent last.
            unbilled:
              type: string
              description: Browser time of running sessions not yet charged.
            available:
              type: string
              description: >-
                The three balances less unbilled. At zero or below, requests
                that cost money answer 402 insufficient_balance.
            monthly_credit:
              type: string
              description: >-
                The plan's monthly fee; on an on-demand plan each paid period
                grants it as plan_balance.
            voucher_expires_at:
              type:
                - integer
                - 'null'
              description: Unix timestamp in seconds; null without a voucher.
            subscription:
              type:
                - object
                - 'null'
              properties:
                status:
                  type: string
                  description: Status as Stripe reports it, such as active or past_due.
                cancel_at_period_end:
                  type: boolean
                current_period_end:
                  type:
                    - integer
                    - 'null'
                  description: Unix timestamp in seconds.
                pending_plan:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Plan the subscription switches to at the period end; payg
                    when cancelling.
              required:
                - status
                - cancel_at_period_end
                - current_period_end
                - pending_plan
              description: >-
                The Stripe subscription as Surfsky last saw it; null without
                one.
            prices:
              type: object
              properties:
                browser_hour:
                  type: string
                  description: Price of a browser hour; "0" on a reserved plan.
                proxy_gb:
                  type: string
                  description: Price of a GB of premium proxy traffic.
              required:
                - browser_hour
                - proxy_gb
            auto_recharge:
              type: object
              properties:
                enabled:
                  type: boolean
                threshold:
                  type:
                    - string
                    - 'null'
                  description: available below which the saved card is charged, in USD.
                amount:
                  type:
                    - string
                    - 'null'
                  description: USD charged per recharge.
              required:
                - enabled
                - threshold
                - amount
          required:
            - on_demand
            - plan
            - plan_balance
            - voucher_balance
            - purchased_balance
            - unbilled
            - available
            - monthly_credit
            - voucher_expires_at
            - subscription
            - prices
            - auto_recharge
      required:
        - success
        - data
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        msg:
          type: string
        code:
          type: string
        data: {}
        detail: {}
        error: {}
      description: >-
        Error fields vary for forwarded responses. Check HTTP status and code
        when present.
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: X-Cloud-Api-Token
      description: API token from your dashboard.

````

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