#Gizmo-past due subscription

1 messages ยท Page 1 of 1 (latest)

craggy agate
#

๐Ÿ‘‹ happy to help

stoic pecan
#

Hi tarzan, thank you!

craggy agate
#

I don't have a straight forward of way of doing this

#

I might need to ask my colleagues, could you please hold on a bit

stoic pecan
#

Sure, thank you. I'm looking for the number of days a subscription is past due and the date it was paid through.

craggy agate
#

do you need this on past subscriptions?

#

as analysis data

#

or do you want to implement this going on forward

stoic pecan
#

Just going forward. For a current unexpired subscription I need to know how many days overdue it is, and ideally the paid through date (when it became overdue). I need to display how many days a subscription payment is overdue is on my site, and after a certain number of days I end the subscription.

#

I also email users n days in advance of their subscription renewal so they're not surprised and there are fewer complaints, so I use the paid through date for that as well

brittle falcon
#

Hey, taking over here

stoic pecan
#

Hi ynnoj

brittle falcon
#

There's no past due state stored on the Subscription object

#

Thinking if there's a way to compute these values

stoic pecan
#

Thank you for giving this thought!

brittle falcon
#

I assume you're using collection_method: 'charge_automatically' on your Subscriptions?

stoic pecan
#

I'll double check

#

I'm calling the PHP library subscriptions->create with, in part,

            'expand' => ['latest_invoice.payment_intent'],
            'payment_settings' => [
                'save_default_payment_method' => 'on_subscription'
            ]```
#

Then I'm using the latest_invoice payment intent as the payment intent for my customer to pay

brittle falcon
#

Reason I ask is if you use send_invoice then the due date of the invoice is tracked on the Invoice object. But not for charge_automatically (default)

stoic pecan
#

Gotcha. So given that I don't, there isn't a due date? Is there any way to calculate it based on what we have? I originally thought the number of days past due would be the number of days since the current period start (which is available) if the status is past_due.

brittle falcon
#

Hmm, not sure if that will work. The subscription will keep cycling through billing periods, regardless of invoice status

stoic pecan
#

Yeah that's what I realized. Is there any way you can think of? Is there a way to get the last successful payment for a subscription?

#

Also, will the subscription renew/charge automatically even if I haven't explicitly set collection_method=charge_automatically?

brittle falcon
#

Yes, that's the default behaviour

stoic pecan
#

Thanks

#

So if my subscriptions are annual

#

Would it be safe to regard the billing_period_start as the paid through date if the current status is past_due?

#

If I'm going to terminate the subscription after 90 days of non payment such that it should never remain past due over another year threshold?

dense mesa
#

I think that makes sense yes. current_period_start (assuming that's what you meant) is basically the time the most recent invoice was issued

#

so that makes sense as a date from which payment is due

stoic pecan
#

Yes, current period start.

I'm trying to get the date through which the subscription is paid for/paid up, so it seems it should be the current_period_start for any subscription in a past_due state, and a current_period_end for any subscription in an active state, right?

dense mesa
#

that seems reasonable

stoic pecan
#

Thanks. Is there a discrete state for subscriptions that are over as opposed to subscriptions which are canceled, which I know can still be "active" until the end of the current billing period?

loud torrent
#

Hi there. Catching up

#

Also, what do you mean by "subscriptions that are over"?

stoic pecan
#

Thanks for this link, I hadn't read it yet. By "over" I mean if a subscription's renewal fails and the customer hasn't addressed it within n days, I want to end their subscription.

loud torrent
stoic pecan
#

Thanks, it looks like I have a good amount of reading to do. Do people typically send their own upcoming renewal email or let Stripe handle it? I had created it in my application, but I wonder if I should just let Stripe take care of it

loud torrent
stoic pecan
#

Terrific, thank you. I'll read through all of this after work. Have a great day

loud torrent
#

No problem! Same to you