#alexpanda_subscription-billing-cycle-anchor

1 messages · Page 1 of 1 (latest)

errant starBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1395465339688587284

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

foggy sleet
coarse lion
#

so how would I ensure we charge a single invoice upon a resume API call, and ensure we continue to charge on the interval from then on?

foggy sleet
#

If you don’t set a resumes_at date, the subscription remains paused until you unset pause_collection.

So I'd say you just need to unset pause_collection for it to resume, and then it should continue billing on the existing cycle.

coarse lion
#

the way we're using this is that we are allowing to pause the collection, say for 6 months, but the product is removed from the account, so if a resume happens say after month 2 or 3, we resume, but no payment is made immediately, so no product is added to the account

#

this means that after resume, the product is not activated until the next billing cycle

#

we want to immediately charge, get the webhook of payment and add the product to the account again

#

the docs say this is used to "give the product for free" but we just want to pause colleciton, then resume collection without re-subscribing

foggy sleet
#

What event(s) are you using to provision/deprovision the product?

coarse lion
#

when we start the sub, the charge.succeeded event to add the product for the cycle interval, 1 month or one year.. we store a product expiry date based on this interval. once the date passes, the product is removed

#

so if you pause a monthly sub, after the expiry date product is removed.. but once you resume, we need to charge (because we dont want to give product for free)

foggy sleet
coarse lion
#

but that doesnt charge, which means were giving product for free

foggy sleet
#

You will charge again when they're next due though, on the original cycle.

coarse lion
#

they could cancel before that date

#

is there no way to charge ommediately? maybe with billing_cycle_anchor?

foggy sleet
#

Like, if I paid on the 1st, then pause on the 15th for two months, until the 15th of Twomonthtember, why would you charge me again before the 1st of the upcoming month, since I've already paid for the second half of a month before I paused? Or do you refund that?

#

If you want to essentially start a new subscription on the day they 'unpause', then you likely should just cancel when they pause, and create a new one if/when they 'unpause.'

coarse lion
#

say:

June 1st you pay $9 for monthly sub, you have product until July 1st
You then pause for 3 months, so resumes_at is now Sept 1st
you lose the product July 1st
you resume on July 15th, you have no product, and no invoice is paid, nothing happens

#

ideally we want on 15th, to charge them immediately, either prorated or not, and have the product added back after payment confirmation

foggy sleet
#

When did I pause it?

#

Does it pause effective the end of this billing cycle?

coarse lion
#

Anytime in June

#

say June 1st

#

pause june 1st, resumes_at is Sept 1st

foggy sleet
#

So if I pause on June 10, I've used about $3 worth of value, and thrown the other $6 away?

coarse lion
#

no, the product is not removed when pausing a sub, its removed on the expiry date, which is purchase date + 1 month

#

so as of July 2nd, no more access to product

foggy sleet
#

Ok, gotcha. So if I pause on June 2, I can still access it until July 1 right ok.

coarse lion
#

yes pausing is just pausing colelction of further funds

#

so resuming after July 2nd, should charge... im thinking billing_cycle_anchor = now? should do it?

foggy sleet
#

Right, but my question was about when you deprovision the services relative to the date on which it was paused.

coarse lion
#

purchase date + 1month is when product is deprovisioned

foggy sleet
#

I don't actually know as I've never tested that myself. Give it a go and see if it works?

#

But realistically, it sounds to me like these would be better handled by just cancelling the existing Subscription effective end of period, and then creating a new one when they "unpause" (or uncancelling if they unpause in the same period).

#

Orrrrrr you're right.

#

So, ya, just reset the billing cycle anchor to now and you should be good. 👍

errant starBOT
coarse lion
#

will give that a shot, thanks!

errant starBOT