Account lookup
The cr-accounts service exposes the user's credit account data and the account OTP delivery.
Query account data
POST v2/credits/accounts/
Authorization: <token>
Content-Type: application/json
Body
{
"bank": "bam",
"trxUID": "txn-xyz",
"user": { "type": "document", "value": "1234567890101" }
}
Required: bank. In addition, at least one of: trxUID or user.value.
Response (AccountOutput)
{
"success": true,
"data": {
"account": "ACC-123456",
"name": "Juan Pérez",
"balance": 1500.0,
"currency": "GTQ",
"approvedAmount": 5000.0,
"usedAmount": 3500.0,
"bank": "Banco X",
"payment": { "amount": 250.0, "paymentDate": "2026-02-01" },
"buy": { "amount": 1000.0, "paymentDate": "2026-02-15" }
}
}
Errors: 6000 (missing trxUID/user.value, or transaction/user validations), 6003 (account not found).
Send account OTP
POST v2/credits/accounts/otp
Authorization: <token>
Content-Type: application/json
Body
{
"trxUID": "txn-xyz",
"account": "ACC-123456"
}
Required: trxUID, account.
Response
{ "success": true, "data": { "device": "****5678" } }
device is the masked phone the OTP was sent to. Errors: 6000.
Account update webhook
The bank notifies account changes asynchronously (amortization or delinquency). This endpoint does not go through the TOKEN Authorizer.
POST v2/credits/webhooks/banks/{bank}/accounts/updates
Content-Type: application/json
Body (bank → Migo)
{
"account": "ACC-123456",
"notificationType": "delinquencyUpdate",
"changes": {
"interest": 12.5,
"inDefault": true,
"daysOverdue": 35,
"debtAmortization": 0,
"transaction": "txn-xyz",
"transactionStatus": "delinquency",
"overdueAmount": 450.0,
"timestamp": "2026-02-20T10:00:00Z"
}
}
notificationType ∈ debtAmortization | delinquencyUpdate. See Webhooks and notifications for the rest of the events.