1

I know you can use e.g. monero-wallet.cli to confirm payment via a payment ID, but how do you do this with a JSON call to the daemon?

user3222
  • 11
  • 1

1 Answers1

1

There are get_payments and get_bulk_payments JSON RPCs you can send to a running monero-wallet-rpc daemon to get a list of incoming payments using some given payment IDs.

There are some examples at https://getmonero.org/resources/developer-guides/wallet-rpc.html

curl -X POST http://127.0.0.1:18082/json_rpc
     -d '{"jsonrpc":"2.0",
          "id":"0",
          "method":"get_payments",
          "params":{"payment_id":"4279257e0a20608e25dba8744949c9e1caff4fcdafc7d5362ecf14225f3d9030"}}'
     -H 'Content-Type: application/json'

{ "id": "0",
  "jsonrpc": "2.0",
  "result": { "payments": [{ "amount": 10350000000000,
                             "block_height": 994327,
                             "payment_id": "4279257e0a20608e25dba8744949c9e1caff4fcdafc7d5362ecf14225f3d9030",
                             "tx_hash": "c391089f5b1b02067acc15294e3629a463412af1f1ed0f354113dd4467e4f6c1",
                             "unlock_time": 0 }] } }
glv
  • 3,334
  • 10
  • 15