#nunu0951_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ 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.
hi there!
did you expect to receive an invoice.updated event when the invoice became past due?
yes
i am handling subscription cancellation in that event for ideal and bancontact
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?
i am not sure
actually what i need is to cancel subscription after 2 days, then is there any other way
https://dashboard.stripe.com/acct_1DuHXnF4niufLwn4/test/invoices/in_1T7BqXF4niufLwn4YlN9m6A8
but ths is in past_due state not open
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
but ths is in past_due state not open
if you look at the object in the API, there's no "past_due" status: https://docs.stripe.com/api/invoices/object#invoice_object-status
then is there any other way
we have a lot settings in the Stripe Dashboard for this: https://dashboard.stripe.com/settings/billing/subscriptions
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
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
is that the way to handle ideal and bancontact subscription failure?
any other alternative
I'm not sure I follow your question.
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
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
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
yes that is also an option.
ok