Ledger balances
View balance lineage
See a balance's provider breakdown when fund lineage is enabled with the Go SDK.
GET
/balances/{balance_id}/lineageUse client.LedgerBalance.GetLineage to inspect a balance’s fund breakdown.
Call the method
lineage, _, _ := client.LedgerBalance.GetLineage(
"bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f",
)
| Field | Type | Description |
|---|---|---|
balanceID | string | Balance ID with fund lineage enabled. |
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"
}
]
}Go response (*blnkgo.BalanceLineage)
| Field | Type | Description |
|---|---|---|
BalanceID | string | Balance you queried. |
AggregateBalanceID | string | Internal aggregate balance ID for combined provider funds. |
TotalWithLineage | *big.Int | Total available funds tracked by lineage (minor units). |
Providers | []LineageProviderBreakdown | Provider-by-provider breakdown of received and spent funds. |
Providers.Provider | string | Provider name (for example stripe). |
Providers.Amount | *big.Int | Total amount received from the provider (minor units). |
Providers.Available | *big.Int | Remaining available amount (minor units). |
Providers.Spent | *big.Int | Amount spent from the provider (minor units). |
Providers.ShadowBalanceID | string | Shadow balance ID for this provider’s funds. |