How to check if payment was processed for Shopify app subscription?

I’m working on a Shopify app that uses the billing system and I’m running into a problem. My app has a 3-day free trial for users. When someone uninstalls the app during the trial, everything works fine because their subscription gets canceled and I move them to a free plan.

But here’s the issue: when a customer gets charged after the trial ends and then uninstalls the app later, the subscription status still shows as “canceled” in the AppSubscription GraphQL. This makes my system think they never paid, so it downgrades their account even though they already paid money.

I need a way to figure out if a customer actually got billed before I downgrade their account. The GraphQL allSubscriptions endpoint doesn’t seem to help because it always shows CANCELLED status after app removal, regardless of payment history.

I also noticed the RecurringApplicationCharge REST API has an “activated_on” field. Would this be reliable to use as proof of payment?

What’s the best approach to track whether a subscription was actually charged or not?

The activated_on field in the RecurringApplicationCharge REST API is a decent indicator, but I’ve found it’s not always reliable for this scenario. What worked better for me was setting up a webhook listener for the app_subscriptions/update event and tracking payment status changes in my database. When I hit this same issue, I started storing subscription status transitions with timestamps. The key insight: you can tell trial cancellations from post-payment cancellations by checking if the subscription ever hit an “active” billing state after the trial ended. Another useful approach was querying the subscription’s currentPeriodEnd date and comparing it with your trial duration. If currentPeriodEnd goes beyond the trial window, it usually means at least one billing cycle went through successfully, even if the subscription shows cancelled later. I’d recommend combining webhook monitoring with periodic subscription checks through GraphQL to keep accurate billing state in your system.

Shopify billing’s a pain. I use the billingAttempt GraphQL query to check actual payment attempts - way more reliable than subscription status. Shows whether Shopify tried charging and if it worked or failed. Beats guessing from activated_on dates.

Had this exact issue six months ago and figured out a reliable fix. Shopify’s subscription status doesn’t tell you if someone cancelled during trial vs after paying - it’s all the same status. I built a custom tracking system that watches the subscription lifecycle more closely. Here’s what works: store the original trial end date when someone subscribes, then compare it to when they actually cancelled. If they cancelled after the trial ended, you know they paid. Also check the AppSubscription’s lineItems field - it shows pricing info. If you see billing cycles past your trial window, that’s proof they were charged. The REST API’s activated_on field can help but I’ve seen it give wrong info sometimes. My advice: set up webhook tracking for subscription events and keep your own payment records alongside Shopify’s data. Gives you way more control over these billing edge cases.