Which is the correct way of checking if the user paid for my app?

Hi there! Im new here!

This is my first post!

For the admin UI you guys use the Shopify billing check or check manually via a middleware?

Like im chekcing directly with:

const { hasActivePayment } = await billing.check();

Or should I check in my DB where I store the paymant webhook data.

You don’t need to check directly every time when the app initially loads.
Instead, you can subscribe APP_SUBSCRIPTIONS/UPDATE and APP_UNINSTALLED webhooks to update subscription status in database.
And you can check with the subscription status in DB.

2 Likes