get_bulk_payments
Returns incoming transfers for a batch of payment IDs at once, optionally restricted to transactions confirmed at or above a given block height.
Request
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_bulk_payments",
"params": {
"payment_ids": [
"60900e5603bf96e3",
"cb0d0a1a4e1c6f6a2c1c9e6b8f0a3d7e4b25c1f6a8d9037e5b1c2a4d6e8f0123"
],
"min_block_height": 200000,
"allow_locked_transactions": false
}
}
Request parameters
- payment_ids - array of strings; hex-encoded payment IDs to look up. Every incoming transfer tagged with any of these payment IDs is returned in a single flat list. Both short (8-byte) and long (32-byte) payment IDs may be mixed in the same request. An empty array returns an empty result.
- min_block_height - unsigned int; only transfers included in a block with a height greater than this value are returned. Pass
0to get the full history for the given payment IDs. - allow_locked_transactions - boolean; when
true, transfers whose coins are still locked (unspendable) are included in the result as well. Whenfalse, only unlocked transfers are returned.
Response
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"payments": [
{
"payment_id": "60900e5603bf96e3",
"tx_hash": "01220e8304d46b940a86e383d55ca5887b34f158a7365bbcdd17c5a305814a93",
"amount": 1000000000000,
"block_height": 202556,
"unlock_time": 0
},
{
"payment_id": "cb0d0a1a4e1c6f6a2c1c9e6b8f0a3d7e4b25c1f6a8d9037e5b1c2a4d6e8f0123",
"tx_hash": "9f3c1d24e0b7a5c86d41f2b9e73a0c5d8b6142fe37a95c0db8e2413f6a7c05de",
"amount": 250000000000,
"block_height": 203114,
"unlock_time": 0
}
]
}
}
Response information
- payments - array of incoming transfers matching the requested payment IDs. The list is flat: entries for different payment IDs are mixed together, so use the per-entry
payment_idfield to attribute each transfer. - payments[].payment_id - string; hex-encoded payment ID this transfer was tagged with, i.e. the entry of
payment_idsthat matched. - payments[].tx_hash - string; hash of the transaction that carried this transfer.
- payments[].amount - unsigned int; amount received, in atomic units (1 coin = 10^12 atomic units).
- payments[].block_height - unsigned int; height of the block containing the transaction.
- payments[].unlock_time - unsigned int; if nonzero — unix timestamp since then this transfer's coins can be spent. If it is less than 500000000, the value is treated as a minimum block height at which this transfer's coins can be spent.