#edutomesco

1 messages · Page 1 of 1 (latest)

woven crestBOT
steep meteor
timber basalt
#

But I want exactly the moment

#

I mean i want the webhook exactly on the time the subscription renews

#

invoice.upcoming it's send a couple of days before

steep meteor
#

The peroid_start timestamp of the invoice tells you when the new cycle starts

timber basalt
#

but then what webhook I should listen

#

but I want to receive the webhook and immediately run an action

steep meteor
#

The event data of invoice.upcoming webhook is an invoice

timber basalt
#

??

#

I want to receive the webhook immediately the moment it renews

steep meteor
#

There's no such events dedicated for this. The closest I can find is invoice.paid. However, if the renewal fails then this event will not occur.

timber basalt
#

and this: invoice.updated

#

I think it created even the invoice is paid with success or not

steep meteor
#

This event will be fired whenever an invoice is updated, so you might get a few invoice.updated when the invoice was updated.

timber basalt
#

Good point

#

and if I take invoice.paid and invoice.payment_failed

#

??

steep meteor
#

Processing a payment takes time, it's not guarantee that these two events will be fired at exactly the renewal time.

#

I'd suggest you to take the period_start timestamp and schedule a job to execute your micro service

timber basalt
#

Okey Nice! thank you