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

# Get drawdown balance

> Get current drawdown balance for the authenticated developer



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/checkout-intents/openapi.documented.yml get /api/v1/billing/balance
openapi: 3.0.0
info:
  title: Universal Checkout API
  version: 1.0.5
  description: >-
    Turn any product URL into a completed checkout. Instantly retrieve price,
    tax, and shipping for any product, and let users buy without ever leaving
    your native AI experience.


    View the [Rye API docs](https://docs.rye.com).
  termsOfService: https://rye.com/terms-of-service
  license:
    name: UNLICENSED
  contact:
    name: Rye
    email: dev@rye.com
    url: https://docs.rye.com
servers:
  - url: https://staging.api.rye.com
security: []
paths:
  /api/v1/billing/balance:
    get:
      tags:
        - Billing
      summary: Get drawdown balance
      description: Get current drawdown balance for the authenticated developer
      operationId: GetBalance
      parameters: []
      responses:
        '200':
          description: Balance in smallest currency unit and currency code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceResponse'
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateError'
      security:
        - bearerAuth:
            - billing:read
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import CheckoutIntents from 'checkout-intents';

            const client = new CheckoutIntents({
              apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.billing.getBalance();

            console.log(response.balance);
        - lang: Python
          source: |-
            import os
            from checkout_intents import CheckoutIntents

            client = CheckoutIntents(
                api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"),  # This is the default and can be omitted
            )
            response = client.billing.get_balance()
            print(response.balance)
        - lang: Java
          source: |-
            package com.rye.example;

            import com.rye.client.CheckoutIntentsClient;
            import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
            import com.rye.models.billing.BillingGetBalanceParams;
            import com.rye.models.billing.BillingGetBalanceResponse;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();

                    BillingGetBalanceResponse response = client.billing().getBalance();
                }
            }
        - lang: cURL
          source: |-
            curl https://staging.api.rye.com/api/v1/billing/balance \
                -H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"
components:
  schemas:
    BalanceResponse:
      properties:
        drawdownEnabled:
          type: boolean
        balance:
          $ref: '#/components/schemas/Money'
      required:
        - drawdownEnabled
        - balance
      type: object
    AuthenticationError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    ValidateError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
        status:
          type: number
          format: double
        fields:
          $ref: '#/components/schemas/FieldErrors'
      required:
        - name
        - message
        - status
        - fields
      type: object
      additionalProperties: false
    Money:
      properties:
        currencyCode:
          type: string
          example: USD
        amountSubunits:
          type: integer
          format: int32
          example: 1500
      required:
        - currencyCode
        - amountSubunits
      type: object
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
          - message
        type: object
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Rye API key

````