Integration Guide — CRM Current Account
Concepts
Customer (entityKeyId)
Text identifier of the customer (up to 25 characters). Both endpoints use this value as keyId in the route.
Balance by overdue periods
balance-aging response: total open balance split by overdue periods (entity form: Total, Not due, Up to 30 days, 31 to 60 days, etc.), plus loyalty points:
| Field | Description |
|---|---|
balance | Total (net open balance) |
notDue | Not due |
overdue0To30 | Up to 30 days |
overdue31To60 | 31 to 60 days |
overdue61To90 | 61 to 90 days |
overdueOver90 | More than 90 days |
points | Loyalty points |
Customer balance
| Method | URL | Description |
|---|---|---|
| GET | /gateway/entity/{keyId}/balance-aging | Returns balance by overdue periods and points without rebuilding movements |
| POST | /gateway/entity/{keyId}/balance-aging/recalculate | Rebuilds checking account and returns recalculated balance |
Route parameter: keyId — customer entityKeyId (URL-encode special characters if needed).
Use GET for a quick read of the already calculated balance. Use POST recalculate when recent movements may not be reflected (for example, after settlements or checking-account entries).
Response (200 OK)
{
"balance": 1250.5,
"notDue": 800,
"overdue0To30": 200.5,
"overdue31To60": 150,
"overdue61To90": 100,
"overdueOver90": 0,
"points": 42.5
}
Examples
Query balance
GET /gateway/entity/CLI001/balance-aging
See Returns customer balance by overdue buckets.
Recalculate balance
POST /gateway/entity/CLI001/balance-aging/recalculate
See Rebuilds checking account and returns recalculated balance aging.
Recommended flow
- Identify the customer — obtain
entityKeyId. - Query position —
GET /gateway/entity/{keyId}/balance-aging. - Refresh balance —
POST /gateway/entity/{keyId}/balance-aging/recalculatewhen recent movements need to be reflected.
Common errors
| HTTP code | Situation | Suggested action |
|---|---|---|
| 401 | Missing or invalid token | Authenticate on the gateway |
| 404 | Unknown keyId | Verify customer entityKeyId |
Errors follow the API Problem Details format.
Conclusion
CRM current account exposes balance query and recalculation by overdue periods at /gateway/entity/{keyId}/balance-aging. Use GET to read and POST to recalculate when the customer's financial position needs updating.
Last updated: June 2, 2026