Appearance
Get Active Balance
http
GET https://api.creduse.com/get-active-balanceGet the active balance for a user and the details of each active cycle.
Request body
| Parameter | Type | Description |
|---|---|---|
end_user_id | UUID | Required. The unique identifier of the user. |
Example request
curl
curl https://api.creduse.com/get-active-balance \
-H "Authorization : Bearer $YOUR_API_KEY"
-H "Content-Type: application/json" \
-d '{"end_user_id": "UUID"}' \Python
from creduse import CreduseClient
client = CreduseClient()
client.get_active_balance(
end_user_id=UUID("12345678-1234-5678-1234-567812345678")
)Returns
The endpoint returns a JSON object containing the following information:
end_user_id: The UUID of the user whose balance was queried.active_balance_by_cycle: An array of objects, each representing a balance cycle:cycle_start: The start date and time of the cycle in ISO 8601 format.cycle_end: The end date and time of the cycle in ISO 8601 format.amount: The remaining balance for this cycle after any transactions.starting_amount: The initial balance amount at the start of this cycle.status: The status of the cycle. Can beactive,canceled.- The
activestatus is returned for recurring cycles and one-time cycles that are still active. - The
canceledstatus is returned for canceled cycles that will not be renewed.
- The
cycle_type: The type of cycle. Can berecurringorone-time.
active_balance: The total active balance across all cycles.
json
{
"end_user_id": "UUID",
"active_balance_by_cycle": [
{
"cycle_start": "2025-08-12T14:35:55.423145Z",
"cycle_end": "2025-08-14T23:59:59.999999Z",
"amount": 43,
"starting_amount": 50,
"status": "active",
"cycle_type": "recurring"
},
{
"cycle_start": "2025-08-12T14:35:55.423145Z",
"cycle_end": "2025-08-14T23:59:59.999999Z",
"amount": 10,
"starting_amount": 15,
"status": null,
"cycle_type": "one-time"
}
],
"active_balance": 53
}