#yuvi00001

1 messages · Page 1 of 1 (latest)

livid fieldBOT
torn jacinth
#

Hi! Let me help you with this.

#

To clarify, by

but it takes 4-5 months
you mean 4-5 test clock months, correct?

halcyon coyote
#

yess

torn jacinth
#

Please give me a moment to check.

halcyon coyote
#

I disabled the stripe smart retries behavior and changed the parameters to "send_invoice" with a due_date of 2 days, I'm expecting status of sub to get change after these 2 days time period.

torn jacinth
#

Sorry for long wait, I am trying to collect all the parameters of your situation to see what's happening.

torn jacinth
halcyon coyote
#

No it doesn't

#

My subscription has 2 subscriptionItems in it ( usage_type "liscenced" and "metered" ) , do the make any difference?

torn jacinth
#

No, that shouldn't influence that.

halcyon coyote
#

Should I share my subscription body in JSON ?

torn jacinth
#

I see you are creating the Subscription via Stripe Checkout. The request body looks fine.

#

The timing of the status changes of subscriptions and invoices are not always intuituve. Maybe you could share more about what you are trying to achieve so we could come up with a solution.
Are you expecting an event that tells that a payment has failed?

halcyon coyote
#

okay, like in my case
if a customer completes a successful checkout on Feb 21, so now they have paid for cycle (Feb 21 to Mar 21),
when test_clock is set to Mar 21, a new Invoice gets generated.

from here what i want is if this invoice doesnt gets paid in 3 days, i want status of subscription to be changed to "past_due" from "active".

what happening is, on Mar 21 a new invoice gets created and status of subscription stays "active",
Then I set test_clock to Apr 21, another invoice gets generated and status of subscription still remains "active" meanwhile two invoices stays unpaid. This moving ahead in time happens for a couple of months till status of subscription changes to "past_due".

I want status to be changed to "past_due" right after 3 days if invoice is left unattended.

Actually, Ive configured a webhook for "customer.subscription.updated" which tells anytime theres a change in subscription, from where I handle "past_due" flow in my code.

#

hope this gives a better understanding of the issue

thin hawk
#

Hey! Taking over for my colleague. Let me catch up.

#

I want status to be changed to "past_due" right after 3 days if invoice is left unattended.
You can't configure this automatically on Stripe, you need to monitor webhook in your integration
https://stripe.com/docs/billing/subscriptions/webhooks#payment-failures
And implement this logic of 3 days in your integration, if after 3 days you don't get invoice.paid event, then you disable the service for you customer, and you can cancel the subscription.

halcyon coyote
#

Actually, in my initial days of development with stripe, when I was creating subscription with a single subscriptionItem I was able to achieve "past_due" after 1-2 days of invoice left unpaid ( but their stripe was collecting payment with stripe smart collection method "charge_automatically" ), when I disabled this setting ("send_invoice") and added 2 subscriptionItem to my subscription I was left with this issue.

thin hawk
#

but their stripe was collecting payment with stripe smart collection method "charge_automatically" ), when I disabled this setting ("send_invoice") and added 2 subscriptionItem to my subscription I was left with this issue.
Ah you didn't mentioned this at the begining. If you want that the subscription passes automatically to past due, then you need to keep the collection method automatically. send_invoice means that you want to manage to invoice cycle by your self.

halcyon coyote
#

but again I dont want stripe to charge customers automatically... (without there consent)
can this be achieved ?

thin hawk
#

nope

#

You need to handle this in your integration.