MolnPayDocs
API reference

Balances

GET/v1/customers/{id}/balances

The read most integrations want. available is spendable; locked is reserved against an in-flight payout.

AuthorizationBearer <token>

Authorization: Bearer mp<64 hex> for live, mptest<64 hex> for test.

The token is the prefix plus 64 lowercase hex characters (32 CSPRNG bytes) and nothing else — no separators, no embedded fields — so nothing in it needs quoting, escaping or encoding. Send it in the Authorization header and nowhere else. Never put it in a query string: URLs reach access logs, proxy logs, browser history and Referer headers, and a key that lands in any of those is a leaked key. A key's KIND (checkout, payout or wallet) is a property of the key, not of the string: it is chosen at creation, returned by GET /v1/ping, and decides which routes the key may reach.

The full key is shown exactly once, at creation. No endpoint can return it afterwards. Moving funds additionally requires signing to be enabled globally, for your project, and for that key — so a read-only key is a supported configuration.

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/balances"
{  "object": "balance_list",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "data": [    {      "asset": {        "chain": "ethereum",        "symbol": "USDT",        "decimals": 6,        "contract": "string"      },      "available": "1500000000000000000",      "available_decimal": "1.5",      "locked": "1500000000000000000",      "locked_decimal": "string",      "total": "1500000000000000000",      "total_decimal": "string",      "onchain": "1500000000000000000",      "onchain_decimal": "string",      "drift": "string"    }  ]}
GET/v1/wallets/{id}/balances
AuthorizationBearer <token>

Authorization: Bearer mp<64 hex> for live, mptest<64 hex> for test.

The token is the prefix plus 64 lowercase hex characters (32 CSPRNG bytes) and nothing else — no separators, no embedded fields — so nothing in it needs quoting, escaping or encoding. Send it in the Authorization header and nowhere else. Never put it in a query string: URLs reach access logs, proxy logs, browser history and Referer headers, and a key that lands in any of those is a leaked key. A key's KIND (checkout, payout or wallet) is a property of the key, not of the string: it is chosen at creation, returned by GET /v1/ping, and decides which routes the key may reach.

The full key is shown exactly once, at creation. No endpoint can return it afterwards. Moving funds additionally requires signing to be enabled globally, for your project, and for that key — so a read-only key is a supported configuration.

In: header

Path Parameters

id*string
Formatuuid

Query Parameters

source?string

chain and both include the on-chain reading and a drift field, and are rate-limited harder.

Default"ledger"

Value in

  • "ledger"
  • "chain"
  • "both"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/wallets/497f6eca-6276-4993-bfeb-53cbbbba6f08/balances"
{  "object": "balance_list",  "wallet_id": "d9a8fbfc-848f-43a2-9168-911ed3a04a48",  "source": "string",  "data": [    {      "asset": {        "chain": "ethereum",        "symbol": "USDT",        "decimals": 6,        "contract": "string"      },      "available": "1500000000000000000",      "available_decimal": "1.5",      "locked": "1500000000000000000",      "locked_decimal": "string",      "total": "1500000000000000000",      "total_decimal": "string",      "onchain": "1500000000000000000",      "onchain_decimal": "string",      "drift": "string"    }  ]}
GET/v1/balances

surplus is assets minus liabilities. A negative value means more is owed to customers than is held — the single most important number this service produces.

AuthorizationBearer <token>

Authorization: Bearer mp<64 hex> for live, mptest<64 hex> for test.

The token is the prefix plus 64 lowercase hex characters (32 CSPRNG bytes) and nothing else — no separators, no embedded fields — so nothing in it needs quoting, escaping or encoding. Send it in the Authorization header and nowhere else. Never put it in a query string: URLs reach access logs, proxy logs, browser history and Referer headers, and a key that lands in any of those is a leaked key. A key's KIND (checkout, payout or wallet) is a property of the key, not of the string: it is chosen at creation, returned by GET /v1/ping, and decides which routes the key may reach.

The full key is shown exactly once, at creation. No endpoint can return it afterwards. Moving funds additionally requires signing to be enabled globally, for your project, and for that key — so a read-only key is a supported configuration.

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/balances"
{  "object": "treasury",  "data": [    {      "asset": {        "chain": "ethereum",        "symbol": "USDT",        "decimals": 6,        "contract": "string"      },      "deposits": "1500000000000000000",      "treasury": "1500000000000000000",      "in_transit": "1500000000000000000",      "liability": "1500000000000000000",      "surplus": "string"    }  ]}