1

I've been testing my integration for a while. Testing integration with stripe is quite complicating to fully understand for me so far-- some things like manually making special rules for CVC correctness check etc. Now I'm straggling with receiving decline_code 'insufficient_funds' for situation when a user have a card attached but when he tries to buy something with insufficient funds I want to display a corresponding error. Looks like it's quite simple with other errors, we just add stripe rescue method and do whatever we want with the message it has. But for the test card 4000000000000341(https://stripe.com/docs/testing#cards-responses) which allows you to attach it but should fail during charging I don't receive any errors with this rescue method. But I see errors on my stripe dashboard though. Should I consider that in 'battle' mode I will receive such message as intended or I misunderstood something. I would be grateful for any help and a word of advice

  • 1
    From what I see `insufficient_funds` will be returned with this card number 4000000000009995. – stolarz Feb 08 '22 at 08:18
  • I use exactly that card #; it always succeeds as a setupIntent, and always fails as part of a payment. I receive the payment_intent.payment_failed webhook - at that point the payment_method is already removed from the payment_intent (although the information is in a "last_payment_error" entry). This card is NOT declined for insuffcient funds - it is a generic decline. Use the card @stolarz mentioned. – LeadDreamer Feb 09 '22 at 01:24
  • @stolarz with this card I'm receiving an error immediately at the moment I try to attach the card to user. With the one I've mentioned above I'm able to attach the card but charging is not giving back an error about insufficient funds – Michail Romanteev Feb 09 '22 at 05:07
  • how were you able to solve this? I attached the same card hoping it would fail it seems the payment succeeded. – king.reflex Feb 05 '23 at 17:05

0 Answers0