#Stone.D-subsc

1 messages · Page 1 of 1 (latest)

gusty bramble
#

the next cycle date is the current_period_end field on the subscription object, so you should look at that.

worn heron
#

Firstly ,Thanks

#

As you say, i get invoice.upcoming. i get invoice.paid two days later.

#

why?

gusty bramble
#

sorry, totally lost.

#

please be more specific if you can!

worn heron
#

ok,

#

Hi,I have a subscription 18 / 07 / 2022-18 / 08 / 2022. When do i got invoice.upcoming/subscription.updated/invoice.paid in next cycle,

gusty bramble
worn heron
#

Thanks

#

My needs are:
Using stripe checkout subscription on my app, at this point I can get checkout sessionid, on my server I create some basic information in database, use checkout sessionid as index, and then receive checkout.session.completed in webhooking , which contains the subscripiton id in its message body; so that I can associate the basic information created earlier with the subscripiton id. I will ignore other events.

I'm not sure if this is reasonable, please advise me.

gusty bramble
#

sounds totally normal and reasonable to me. Its the Subscription ID sub_xxx that you're interested in for tracking future payments.

worn heron
#

Thanks.

#

When the next cycle comes, it will automatically renew. Which webhooking should I listen for and handle which is reasonable?

gusty bramble
worn heron
#

If I want to handle it, I have to identify the first subscription case, let it not to be handled after creating subscription.

gusty bramble
#

yep there's a billing_reason field on the Invoice for that purpose.

worn heron
#

oops

#

That's very usefully for me. Thanks.

worn heron
#

invoice.paid
When the invoice is paid on or after the 18th.

How to trigger invoice.paid by myself immediatly?

deep eagle
#

I'm assuming you'e just created a new subscription and the initial invoice is unpaid?

worn heron
#

I do that as above steps.

#

invoice.paid trigged after subscription.updated ocurred

#

About 1 hr.

deep eagle
#

Yup, we automate payment ~1 hour after the billing cycle time

worn heron
#

Is there way to trigger immediate on subscription.updated ocurred.

#

?

deep eagle
#

Not without manually finalising and paying the invoice via the API, no

#

It's just not how it works. What's the concern?

worn heron
#

Against to my requirement

#

My business rely on the the start/end cycle of subscription.

#

If the period is end , the customer's business will end.

deep eagle
#

If the invoice payment after ~1 hour fails, then the status of the subscription would reflect that (and you can action as you need with webhooks)

worn heron
#

Yes, this way the user's business will be interrupted ~1hr

#

That's point about my confuse.

#

A subscription 18 / 07 / 2022 00:00:00-18 / 08 / 2022 00:00:00. If the webhooking invoice.paid is not received by 18 / 08 / 2022 00:00:00, I will not create a new subscription for the user The business will be interrupted after 18 / 08 / 2022 00:00:00

frozen granite
#

Hi 👋 I'm jumping in as my teammate needs to step away.

#

Looking back at the context of this thread, it seems like you had questions regarding the behavior of Invoice objects for recurring Subscription payments. Are there additional questions that you have that I can continue assisting with?

worn heron
#

Yes, this way the user's business will be interrupted ~1hr
That's point about my confuse.
A subscription 18 / 07 / 2022 00:00:00-18 / 08 / 2022 00:00:00. If the webhooking invoice.paid is not received by 18 / 08 / 2022 00:00:00, I will not create a new subscription for the user The business will be interrupted after 18 / 08 / 2022 00:00:00

#

Is it certain that invoice.paid can be triggered after an hour?

frozen granite
#

If the behavior of our objects doesn't directly align with the logic that you need, then you'll likely need to look at adding logic on your end to address that.

I'm not sure I understand the question. Webhook events such as an invoice.paid event is not something that you trigger, but is rather a notification that we push to your endpoint when an invoice has been paid.

worn heron
#

You are right.

Is it certain that invoice.paid can be triggered after an hour?

frozen granite
#

After an hour from the creation of the Invoice? If so, yes. Think about the scenario where an Invoice is created, then finalized, then a payment is attempted and fails. If another payment is attempted for that Invoice and succeeds, then the associated invoice.paid event could come much more than an hour after creation of the Invoice.

worn heron
#

Yes, you are right.

#

But why it is ~1hr ?

#

What does the stripe platform in this period?

frozen granite
#

That's a period where the invoice can be edited/updated (once an Invoice is finalized no changes can be made to it), we don't take actions on the Invoice in that time.

worn heron
#

Ok toby ,thanks.

frozen granite
#

Happy to help!