#goliath1879_best-practices
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/1328952876135092234
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- goliath1879_best-practices, 4 days ago, 12 messages
You can pre-setup the Invoice with a will-fail Stripe test card on the customer's default payment method, then call the Pay Invoice API to trigger the payment attempt and a failure
(If I understand your question correctly)
Hmm, I can also trigger a payment failure using one of the card declined test cards as well but I want to keep the invoice in processing state rather than immediately fail or succeed, is this possible?
On production, invoices remain in processing state as long as the payment isn't processed and then only it gets updated. However in developer mode I can trigger a failure or success event immediately.
Ah I see, don't think we have such a card, sorry. Have you tried the "Processing error decline" card 0119? Just in case
Hmm not yet but I can try. However I don't think it will suffice my requirement.
Also, if the invoice is in processing state and I trigger the void invoice API it returns the invalid_request_error instead of saying the invoice is in processing state. how can I know this?
Do you mean you want to test that scenario, but you can't because it's not possible to reproduce processing state in Test mode?
yes
I want to know if the invoice is in pending payments mode...
To avoid the above error message
Sure, if you retrieve the Invoice, which status do you see?
I realise when I do stripe.Invoice.retrieve(invoice) I get status as Open
technically open invoice can be voided right?
Okie then when you retrieve the PaymentIntent of the Invoice, which status do you see?
let me check
payment intent returns a processing status
I think I can use this
thanks
can you help what is the attribute I can use to know what has changed in invoice.updated webhook response?
Can you share the event id? evt_xxx
Its fine I think invoice.updated is not useful as it is always followed by invoice.payment_failed or invoice.payment_succeeded so I can use that.
can you help me with one last thing? can a paid invoice be marked as void? after or before issuing refund
No it can't. See the status transition map here https://docs.stripe.com/invoicing/integration/workflow-transitions