---
title: "Retrieve product treasury balances"
method: GET
path: "/v1/products/{productId}/treasury"
tags: ["Products"]
---

# Retrieve product treasury balances

`GET /v1/products/{productId}/treasury`

## Request

- Base URL: `https://hyperscale0.ai`
- URL: `https://hyperscale0.ai/v1/products/{productId}/treasury`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Reads the product credit (prepaid spend) and earn-rate fee account balances live from the ledger, and the product's posted revenue to date.

## Path parameters

- `productId` string, required: Hyperscale product ID

## Headers

- `X-Hyperscale-Environment` 'sandbox' | 'live'

## Response `200`

Success

- ProductTreasuryRetrieveOutput
  - `environment` 'sandbox' | 'live', required
  - `tenantId` string, required: Organization tenant ID
  - `productId` string, required: Hyperscale product ID
  - `asOf` string, date-time, required
  - `credit` object, required
    - `accountId` string, required: Hyperscale account ID
    - `available` string, required: Non-negative minor-unit integer amount serialized as a string (at most 18 digits)
    - `pending` string, required: Non-negative minor-unit integer amount serialized as a string (at most 18 digits)
    - `settled` string, required: Non-negative minor-unit integer amount serialized as a string (at most 18 digits)
    - `currency` 'SAR', required
  - `earnRateFees` object, required: The account that collects earn-rate fees until product.earnings.settle moves them to withdrawals. It is company cash, not the revenue figure.
    - `accountId` string, required: Hyperscale account ID
    - `available` string, required: Non-negative minor-unit integer amount serialized as a string (at most 18 digits)
    - `pending` string, required: Non-negative minor-unit integer amount serialized as a string (at most 18 digits)
    - `settled` string, required: Non-negative minor-unit integer amount serialized as a string (at most 18 digits)
    - `currency` 'SAR', required
  - `revenue` object[], required: Revenue to date per currency: posted money movements classified as earnings, net of their reversals. The finance report uses the same definition.
    - `currency` 'SAR', required
    - `amount` string, required: Signed minor-unit integer amount serialized as a string (at most 18 digits)

## Other responses

- `default`: ErrorResponse. See x-error-codes and x-errors for codes, HTTP statuses and retry guidance.

---

[API](https://skmtc.dev/hyperscale0/apis/hyperscale-product-api.md) · [All operations](https://skmtc.dev/hyperscale0/apis/hyperscale-product-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hyperscale0/apis/hyperscale-product-api/revisions/e9e8faa044d5?raw)
