Harindra karunanayake
Harindra karunanayake

Reputation: 41

how to test a recurring payment using stripe test cards where the first amount is deducted but the card amount is insufficient for the second payment

I want to test a subscription recurring payment where the first amount is deducted from the card but the card amount is insufficient for the second payment. But I can not find a test card to test the scenario in stripe, can anyone suggest a method to test this scenario using stripe test cards?

Upvotes: 1

Views: 1267

Answers (1)

h__g
h__g

Reputation: 82

You have two scenarios when a charge can fail:

Charge directly a customer. Attach a card to a customer and then try to charge that customer. https://stripe.com/docs/testing#cards provides two test cards for those situations:

4000 0000 0000 0002 "Charge is declined with a card_declined code." 4000 0000 0000 0341 "Attaching this card to a Customer object succeeds, but attempts to charge the customer fail."

Upvotes: 1

Related Questions