API reference › Finance › Overview, clients and work items
Get client credit wallet balance and ledger entries
GET /v1/finance/clients/{clientId}/credit-wallet
- Scope
finance:read- Roles
- admin, scheduler
T23 — Returns client-level unapplied credit wallet balance and ledger rows. Entries may include soft earmark metadata (from_invoice:{id}) from Reverse & Cancel apply_to_new_invoice; earmark is UX-only (soft_lock=false) and does not hard-lock spend. Wallet balance is readable; applying credit to an invoice (spend API) is not shipped yet (T22 deferred).
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
clientId required | string | Client ID Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/finance/clients/{clientId}/credit-wallet" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Client credit wallet retrieved successfully
Client credit wallet retrieved successfully
{
"success": true,
"message": "Client credit wallet retrieved successfully",
"data": {
"balance": 120,
"entries": [
{
"id": 1,
"amount": 120,
"entry_type": "rc_fold_credit",
"tag": "from_invoice:INV-ABC123",
"earmark": {
"source_invoice_id": "INV-ABC123",
"soft_lock": false
}
}
]
}
}Response fields (12)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | object | |
data.balance | number (float) | Example |
data.entries | array of object | |
data.entries[].id | integer | Example |
data.entries[].amount | number (float) | Example |
data.entries[].entry_type | string | Example |
data.entries[].tag | string | Example |
data.entries[].earmark | object or null | |
data.entries[].earmark.source_invoice_id | string | Example |
data.entries[].earmark.soft_lock | boolean | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Server error
{
"success": false,
"message": "An unexpected error occurred — please try again.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string or null | Null in production. The exception message only when the application runs with debug on, so nothing is leaked to an integrator. |
code | string | Always empty: the server-error response carries no error code. Example |