#goliath1879_best-practices

1 messages ¡ Page 1 of 1 (latest)

calm kettleBOT
#

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

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

stoic patrol
#

hi there!

#

I want to void the invoice and prevent charging the customer twice on the same invoice.
I'm not sure I follow. why would the customer be charged twice? can you give a concrete example of the issue?

steep chasm
#

Sure.

I meant when the customer is in processing state on Stripe, since the customer didn't wanted to wait, he settled his invoice through different medium like bank transfer or buy prepaid credits. In this case, the local invoice in my system is already settled while the invoice generated on Stripe is still in processing state. I wish to mark it void but I can't

stoic patrol
#

the invoice generated on Stripe is still in processing state. I wish to mark it void but I can't
yes I don't think you can void an Invoice in a processing state. have you tried? did you get an error? if so, can you share the request ID (req_xxx)? you can find it here https://dashboard.stripe.com/test/logs

steep chasm
#

Yeah I tried I do get an error

#

it throws invalid_request_error

#

My question is what can be the best practise to do in such scenario? Is there a webhook which i can listen to when the state of the invoice changes

stoic patrol
#

My question is what can be the best practise to do in such scenario?
on Stripe end? not much. you would need to tell your customers to just wait instead of trying to pay twice.
Is there a webhook which i can listen to when the state of the invoice changes
sure: invoice.updated

steep chasm
#

okay thanks