Hack A Lapp/Introduction to Bitcoins Lightning Network App Development/C-Lightning with python/Check if your customer has paid the invoice/quiz

1 you want to see if the invoice with the payment hash ph="e21b2df94d678ebb84924ad6a2c6f571a4662d321bf13bdb731d031bb7a87bfa" was paid. what do you do?

rpc_interface.invoices(ph) == "paid"
rpc_interface.invoices(ph)["status"] == "paid"
iterate over all invoices by calling rpc_interface.invoices() and check for each invoice if the payment hash matches and then check the status.

2 You have an invoice stored on invoice how can you access the amount?

invoice["amount"]
invoice["msatoshi"]
invoice["satoshi"]