Howto extract invoice payment url using API

How can I extract the invoice payment url using the API?

I tried looking in the json I got from getting the invoice ID and the invoice reference - neither seemed to contain the online url which the order json does contain.

However one you made the invoice the order payment url will not work - even if the invoice is unpaid :frowning:

found this issue for orders which I copied to invoices