WalletD developers
Ledger and reporting

Money movement, revenue, exposure and reconciliation for a period (admin)

The reporting view behind the console dashboard.

GET/v1/ledger/metrics

The 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
AuthorizationBearer <token>

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

window?string

Reporting period ending now. The previous period of the same length is returned alongside for comparison.

Default"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    }  ]}