Need help with implementing payment flow

I’m working on implementing a hybrid monthly payment flow that combines usage-based and fixed charges. Here are my key requirements:

I need to track when a user transitions from a free trail period to a paid plan. I can use the available webhooks for this.

Now, once they switch to a paid plan, I want to monitor when Shopify has generated their invoice and the amount charged for my app. So that I can show this to the merchant using the app.

Which webhooks / APIs can I use here?

I want to monitor when Shopify has generated their invoice and the amount charged for my app

Would querying the AppSubscription object get you this info?

Which graphql query can be used to query this object?

It would be the currentAppInstallation query.