#cgy
1 messages · Page 1 of 1 (latest)
I guess by 'offline' you mean off_session: true?
yes
Then you'd just use a card that is going to fail, from: https://stripe.com/docs/testing
Great that is what I want. Thank you very much
Easiest would be one that requires auth: 4000002760003184
Because it's an off-session payment, it'll just decline as the customer isn't available to authenticate
OK, I should make sure failed one be dispose properly.
What do you mean?
Just ignore the sentence. I am not very good in English.
🥰
Hi, still there?
I am not mean this decline. I mean I should collect the card info, and charge off_seesion.
Is there be a card which saved correctly, but when charged failed
Because a card may be lack of money or somthing else.
Sorry, I don't understand the issue
Let me make it more understandable. If a card was saved, but when I charge the card may be lack of money or something else right? That's the situation "payment_intent.payment_failed"
I want a card meet this requirement.
Or how can I make a card charge failed to test my code
There's cards here to simulate declines for insufficient funds, etc: https://stripe.com/docs/testing#declined-payments
Sorry, I still not find the one.ðŸ˜
Hi, I tried.
But I should save it first, because I use SetUpIntent
I mean SetupIntent work well, and then PaymentIntent failed
then use this card instead :
ok
This card when I use api "PaymentIntent.create" it failed. When will it be webhook "payment_intent.payment_failed"
if you get an error when creating it means you are passing confirm:true which also attempts the payment. So you could for example instead not pass confirm:true and call https://stripe.com/docs/api/payment_intents/confirm separately
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.