MolnPayDocs
API reference

Sweeps

GET/v1/sweeps
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

Query Parameters

limit?integer
Range1 <= value <= 100
Default25
cursor?string

Opaque cursor from the previous page's next_cursor.

wallet_id?string
Formatuuid
status?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/sweeps"
{  "object": "list",  "has_more": true,  "next_cursor": "string",  "data": [    {      "object": "sweep",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "wallet_id": "d9a8fbfc-848f-43a2-9168-911ed3a04a48",      "chain": "ethereum",      "status": "open",      "amount": "1500000000000000000",      "asset": {        "symbol": "string",        "decimals": 0,        "contract": "string"      },      "amount_decimal": "string",      "skip_reason": "string",      "created_at": "2019-08-24T14:15:22Z"    }  ]}
POST/v1/sweeps

Normally automatic. A sweep does NOT change customer balances — the customer still owns the coins; they merely move from a per-customer deposit address into your omnibus master wallet.

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

Header Parameters

Idempotency-Key?string

Recommended. Replays the stored response for a repeated key.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/sweeps" \  -H "Content-Type: application/json" \  -d '{    "wallet_id": "d9a8fbfc-848f-43a2-9168-911ed3a04a48"  }'
{  "object": "sweep",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "wallet_id": "d9a8fbfc-848f-43a2-9168-911ed3a04a48",  "chain": "ethereum",  "status": "open",  "amount": "1500000000000000000",  "asset": {    "symbol": "string",    "decimals": 0,    "contract": "string"  },  "amount_decimal": "string",  "skip_reason": "string",  "created_at": "2019-08-24T14:15:22Z"}
GET/v1/sweeps/{id}
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/sweeps/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "object": "sweep",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "wallet_id": "d9a8fbfc-848f-43a2-9168-911ed3a04a48",  "chain": "ethereum",  "status": "open",  "amount": "1500000000000000000",  "asset": {    "symbol": "string",    "decimals": 0,    "contract": "string"  },  "amount_decimal": "string",  "skip_reason": "string",  "created_at": "2019-08-24T14:15:22Z"}