Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Free trial loophole while creating recurring charge

Free trial loophole while creating recurring charge

sniper2804
Shopify Partner
409 24 72

Hi, I am facing a doubt in implementing billing. I am trying to create a monthly recurring charge for my app with 3 trial days.

 

This is how I am handling the code -

1. Checking if an active subscription exists in the auth callback. ( billing.check() method in shopify-api )

2. If not, creating a charge using the billing api. ( billing.request() method in shopify-api )

 

The problem is - if a user uninstalls the app before the trial ends, and then reinstalls the app, billing.check() returns false because once an app is uninstalled shopify marks the subscriptions as "cancelled".

 

And because now I am creating a new charge, the user will get the free trial again for 3 days.

 

This is a loophole which can be exploited by merchants to keep using the app for free. How do I handle this? I was able to get the AppSubscription Id for the first charge using the APP_SUBSCRIPTION_UPDATE webhook, but there is no way to update the subscription using api (for obvious reasons). How do I handle this scenario?

Automate & bulk assign products to shipping profile: Auto Shipping Profiles: Shipr
Calculate accurate shipping rates: Shipping Calculator: ShipMagic
Hide, rename, reorder payment methods at checkout: Payment Customization: PayMix
Replies 0 (0)