Skip to content

Get Active Balance

http
GET https://api.creduse.com/get-active-balance

Get the active balance for a user and the details of each active cycle.

Request body

ParameterTypeDescription
end_user_idUUIDRequired. 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"}' \

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.
    • active_balance: The remaining balance for this cycle.
    • status: The status of the cycle. Can be active, canceled.
      • The active status is returned for recurring cycles and one-time cycles that are still active.
      • The canceled status is returned for canceled cycles that will not be renewed.
    • cycle_type: The type of cycle. Can be recurring or one-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",
      "active_balance": 43,
      "status": "active",
      "cycle_type": "recurring"
    },
    {
      "cycle_start": "2025-08-12T14:35:55.423145Z",
      "cycle_end": "2025-08-14T23:59:59.999999Z",
      "active_balance": 10,
      "status": null,
      "cycle_type": "one-time"
    }
  ],
  "active_balance": 53
}