Money movement, revenue, exposure and reconciliation for a period (admin)
The reporting view behind the console dashboard.
/v1/ledger/metricsThe reporting view behind the console dashboard. Balances alone answer "what is the loop holding right now"; this answers "how much money did the loop move, what did it earn on it, what is it exposed to, and do the books still net to zero".
Authorization
bearerAuth A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.
In: header
Query Parameters
Reporting period ending now. The previous period of the same length is returned alongside for comparison.
"30d"Value in
- "24h"
- "7d"
- "30d"
- "90d"
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/v1/ledger/metrics"{ "currency": "string", "window": "string", "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z", "as_of": "2019-08-24T14:15:22Z", "bucket": "hour", "flows": [ { "type": "string", "commodity": "string", "count": 0, "amount": 0, "previous_count": 0, "previous_amount": 0 } ], "series": [ { "start": "2019-08-24T14:15:22Z", "count": 0, "amount": 0, "by_type": { "property1": 0, "property2": 0 } } ], "revenue": { "fees_earned": 0, "previous_fees_earned": 0, "payment_volume": 0, "take_rate_bps": 0, "rewards_paid": 0, "points_issued": 0, "points_redeemed": 0, "money_in": 0, "money_out": 0 }, "position": { "treasury": 0, "user_cash": 0, "merchant_settlement": 0, "fees": 0, "marketing_pots": 0, "marketing_drawn": 0, "suspense": 0, "credit_extended": 0, "credit_granted": 0, "funds_held": 0, "points_outstanding": 0, "funded_wallets": 0, "active_wallets": 0 }, "operations": { "topups_succeeded": 0, "topups_pending": 0, "topups_failed": 0, "topup_success_bps": 0, "awaiting_capture": 0, "awaiting_capture_amount": 0, "holds_expiring_24h": 0, "subscriptions_active": 0, "subscriptions_past_due": 0, "subscriptions_past_due_amount": 0, "subscriptions_due_30d_amount": 0, "subscriptions_mrr": 0, "refunds": 0, "refunds_amount": 0, "payouts": 0, "payouts_amount": 0, "webhook_failures": 0 }, "reconciliation": [ { "commodity": "string", "net": 0, "accounts": 0, "balanced": true } ], "top_merchants": [ { "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea", "name": "string", "count": 0, "amount": 0 } ]}Balance totals per owner type and purpose — the float equation view (admin)
Balances grouped by owner type, purpose and commodity, with the account count behind each row and the tenant's fee plan — the float view an operator reconciles against.
Update the tenant fee plan (audited; admin)
Replaces the fee rule for each money path the body names and leaves every path it does not name untouched, so naming a path is what asks for it to change.