#nunu0951_webhooks

1 messages ¡ Page 1 of 1 (latest)

native iglooBOT
#

👋 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/1479419301264883753

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

deep saddle
#

hi there!

tawdry turtle
#

hi

#

pls check in_1T7BqXF4niufLwn4YlN9m6A8

deep saddle
#

did you expect to receive an invoice.updated event when the invoice became past due?

tawdry turtle
#

yes

#

i am handling subscription cancellation in that event for ideal and bancontact

deep saddle
#

I don't think we send invoice.updated venet in that case, since technically nothing changed on the invoice itself. it's status is still open.
did you receive an invoice.updated event for other invoices when they became past due?

tawdry turtle
#

i am not sure
actually what i need is to cancel subscription after 2 days, then is there any other way

deep saddle
tawdry turtle
#

ok so after 2 days i need to void invoice such that users should not be able to pay again
also need to cancel subscription (cancelling subscription will void invoice)
this is the requirement
but above settings will work for every payment methods , will they?
for card case subscription should cancel after all retries (card - automatic payment)
fir ideal and bancontact (invoice payment) only above case

deep saddle
#

if you want custom rules depending on the Payment Method used, then you'll need to write code with your own logic for this.

#

listen to the invoice.created event, to know when a new invoice is created. save the due_date on your end. then periodically run a script on your end to check for past due invoices, and cancel them if they match your requirements

tawdry turtle
#

is that the way to handle ideal and bancontact subscription failure?
any other alternative

deep saddle
#

I'm not sure I follow your question.

tawdry turtle
#

if a users purchases a recurring plan through ideal or bancontact, i believe the payments wont happen automatically,
they need to pay through the invoice link
in our online course selling platform, when they purchase a subscription plan we send invoice through email
if they failed to pay invoice within 2 days we need to cancel subscription

What stripe suggests for this

deep saddle
#

I already explained this:

listen to the invoice.created event, to know when a new invoice is created. save the due_date on your end. then periodically run a script on your end to check for past due invoices, and cancel them if they match your requirements

tawdry turtle
#

can i use invoice.payment.failed event?
in the invoice.payment_failed
get the invoice created timestamp
then calculate expiry as
expiry = invoice.created + days_until_due
If current time > expiry then cancel subscription

deep saddle
#

yes that is also an option.

tawdry turtle
#

ok