#goliath1879_best-practices

1 messages ¡ Page 1 of 1 (latest)

vague sealBOT
#

👋 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.

burnt orbit
#

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)

delicate needle
#

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.

burnt orbit
#

Ah I see, don't think we have such a card, sorry. Have you tried the "Processing error decline" card 0119? Just in case

delicate needle
#

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?

burnt orbit
#

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?

delicate needle
#

yes

#

I want to know if the invoice is in pending payments mode...

#

To avoid the above error message

burnt orbit
#

Sure, if you retrieve the Invoice, which status do you see?

delicate needle
#

I realise when I do stripe.Invoice.retrieve(invoice) I get status as Open

#

technically open invoice can be voided right?

burnt orbit
#

Okie then when you retrieve the PaymentIntent of the Invoice, which status do you see?

delicate needle
#

let me check

#

payment intent returns a processing status

#

I think I can use this

#

thanks

delicate needle
#

can you help what is the attribute I can use to know what has changed in invoice.updated webhook response?

burnt orbit
#

Can you share the event id? evt_xxx

delicate needle
#

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

burnt orbit