Checking for confirmations using getrawtransaction and decoderawtransaction
The decoderawtransaction RPC call oddly omits the confirmations field in the resulting JSON output. Instead of using decoderawtransaction, try this:

$ bitcoin-cli getrawtransaction &lt;tx_id&gt; true


(Notice the "true" at the end, which means "output as json")

This will return JSON that has a "confirmations" field in the top level of the returned object.