Ledger balances
View balance lineage
See a balance's provider breakdown when fund lineage is enabled with the Java SDK.
GET
/balances/{balance_id}/lineageUse blnk.ledgerBalances().getLineage for this operation.
Call the method
ApiResponse<JsonNode> response = blnk.ledgerBalances().getLineage(
"bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f"
);
| Field | Type | Description |
|---|---|---|
balanceId | String | Balance ID with fund lineage enabled. |
Use the provider breakdown
Read response.data().get("providers") to see how much each provider contributed, spent, and has available. Use total_with_lineage for the aggregate tracked amount.
Response
{
"balance_id": "bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f",
"aggregate_balance_id": "bln_aggregate_shadow_balance_id",
"total_with_lineage": "7500",
"providers": [
{
"provider": "stripe",
"amount": "10000",
"available": "7500",
"spent": "2500",
"shadow_balance_id": "bln_shadow_balance_id"
}
]
}
| Field | Type | Description |
|---|---|---|
balance_id | String | Balance you queried. |
aggregate_balance_id | String | Internal aggregate balance ID for combined provider funds. |
total_with_lineage | String | Total available funds tracked by lineage (minor units). |
providers | JsonNode | JSON array with a provider-by-provider breakdown of received and spent funds. |