Trouble understanding app billing cycle

Pretzel
Shopify Partner
4 0 0

Hello.

I'm developing an app that will have 30-day subscription, and let's say it charges $5.00 and allows 20 purchases through the app per month.

Question is, how do I know the date when I have to reset the purchases count to 0? Naturally, I think it should be the same date the subscription cycle restarts, but how do I know this? AFAIK there's no webhook that triggers on cycle restart, or API endpoint that returns this date, not even the APP_SUBSCRIPTIONS_UPDATE webhook or the recurring_application_charges.json API endpoint. Am I expected to calculate this on my own?

I'm also wondering how to handle upgrades/downgrades/resubscriptions. According to this documentation, the billing cycle is maintained through upgrades/downgrades/resubscriptions (even though in the recurring application charges I see no sight of the original subscription date, unless I look at the very first charge).

So let's say a merchant subscribes for the $5.00 plan, and by day 10 they used up all 20 purchases and then the merchant cancels the subscription (or uninstalls the app). 15 days later they resubscribe for the $5.00 plan again, which generates a new subscription. Since it is a new subscription, I reset the purchases count to 0. Then the billing cycle restarts 5 days later (because supposedly the cycle days are kept even if the merchant uninstalls the app), so I'm guessing the merchant is billed only partially for the 10 days of the first subscription, and for the 5 days of the second susbcription. Because of the cycle restart, I reset the purchases count to 0 again, which would mean they could have used 40 purchases and only pay 50% of the original price because they had a subscription active for a total of 15 days. Is this how it works?

As you can see I'm pretty lost. I hope someone can help me with this.

0 Likes
Bunty
Tourist
73 16 29

There are some things that are your responsibility and some that Shopify maintains. Fundamentally, you have to separate out the operational aspect from the billing cycle and put in place so that they work in harmony (essentially, doesn't double charge or skip charge for a period).

 

  • The mechanism for keeping track of how much app usage has happened and how much is remaining is your responsibility to track
  • How you want to handle the remaining app usage balance upon reinstall is your responsibility to track
  • Applying the usage charge on the store is your responsibility
  • Billing cycle and refreshing remaining balance from the cap in a recurring charge is Shopify's responsibility
  • Charging and recovering from the store is Shopify's responsibility
  • Paying you is Shopify's responsibility

 

So let's walk through your scenario


So let's say a merchant subscribes for the $5.00 plan, and by day 10 they used up all 20 purchases and then the merchant cancels the subscription (or uninstalls the app).
Here, you created the charge and applied it for $5 and you start your 30 day cycle of applying the next charge (independent of the Store billing cycle) kept track that 10 app usage has happened. When they cancel the subscription, you can chose to set their balance to 0 remianing and take the $5 (your cycle resets). If they uninstall, the charge is cancelled, so you will need to create a new one anyway if they reinstall, so you set their balance to 0 remaining and restart the 30 day cycle of applying the next charge

15 days later they resubscribe for the $5.00 plan again, which generates a new subscription. Since it is a new subscription, I reset the purchases count to 0.
Great, you get $5 more and their new balance now is 20 and you start your 30 day cycle again

Then the billing cycle restarts 5 days later (because supposedly the cycle days are kept even if the merchant uninstalls the app),
Nope, this is your new cycle, independent of Shopify billing cycle

so I'm guessing the merchant is billed only partially for the 10 days of the first subscription, and for the 5 days of the second susbcription.
You made $5 for 50% of consumption and $5 again for the normal 20 projected consumption

Because of the cycle restart, I reset the purchases count to 0 again, which would mean they could have used 40 purchases and only pay 50% of the original price because they had a subscription active for a total of 15 days. Is this how it works?
They actually used 2/3 of the capacity and gave you 100% of the price

Hope this helps.

Pretzel
Shopify Partner
4 0 0

Thank you for your time.

So you're saying that when the merchant subscribes, they will pay the full price of the subscription whether they stay subscribed or cancel the subcription at any time? Say they cancel the subscription on the day 2 and only used 5 purchases: they will lose all the remaining 28 days and 15 purchases, and they will be charged full price anyway, and if they want to use the app again they will have to pay $5 again? In other words: when the merchant cancels the subscription, am I supposed to allow them to keep using their remaining purchases until the cycle ends (like the way streaming services work: if I cancel my subscription I'm still able to watch movies until the last day of the cycle), or should I stop the service immediately (i.e. they lose what they didn't use)? I think I'm confusing "I don't want to use this app anymore" with "I don't want to pay for another month but I will use the app until the current cycle ends".

And one last point: the app will work with every-30-day recurring subscription. When a new cycle starts I need to reset the usage to 0. How do I know a new cycle started?

  1. Is a new subscription record created or the same subscription is updated (so I can listen to the APP_SUBSCRIPTION_UPDATE webhook)?
  2. Is there any other webhook I can listen to?
  3. Or I am expected to simply count 30 days since the day the subscription was created?
0 Likes