I’m working on a Shopify app that uses the billing system and running into a problem. My app gives users a 3 day free trial period. When someone removes the app during the trial, I cancel their subscription and move them to a free account on my system. But here’s the issue - after the trial ends and they get charged, if they uninstall the app later, the subscription status still shows as “canceled” in AppSubscription GraphQL. This makes my system think they never paid and downgrades their account even though they already paid money. I need to figure out how to tell if a customer actually got charged or not. The main thing is that if someone already paid, I shouldn’t downgrade their account. The GraphQL appInstallation allSubscriptions doesn’t seem to help because it always shows CANCELLED status when someone uninstalls, even if they paid. I also saw the RecurringApplicationCharge REST API has an activated_on field. Would that work to check if payment went through? Anyone have ideas on the best way to handle this?
yah, activated_on is def your best bet. When a subscription gets charged, that field gets a timestamp. Even if it shows canceled later, just check if activated_on exists to confirm they paid before downgrading. It worked for me in a similar situashun.
Had this exact problem last year. Don’t rely on activated_on - it gets set when the trial starts, not when payment actually happens. What worked for me was setting up a webhook listener for SUBSCRIPTION_BILLING_ATTEMPTS. This fires every time Shopify tries to charge the customer, and you can check the billing_attempt status to see if payment worked or failed. I store this in my database with the subscription ID so I always know if real money changed hands. Webhooks beat polling the API since you get real-time notifications. Just handle webhook retries properly and validate the signature for security.