#gsmcdonald - add bad card

1 messages · Page 1 of 1 (latest)

maiden raft
#

Hello, are you trying to add a test card to get a specific error? Or are you asking something else?

dim jewel
#

Not really. We're fixing a bug in our system where if a customer has an invalid card on their account (like if the card expired), they're unable to pay by invoice (like by check), because we were making calls to update the billing information on the card. We've fixed the bug, but we'd like to test it (without waiting for September to roll around). We were hoping there would be a way to add a card through Stripe. We're open to adding it in any way though.

maiden raft
#

If you use our "Decline after attaching" (4000000000000341) card, you can attach it to a customer successfully, but any payment to the card will fail

#

You can also directly use the ID pm_card_chargeCustomerFail instead of having to tokenize the raw card number

dim jewel
#

Yeah, in this case we aren't actually charging the card. We need it to fail when being updated.

maiden raft
#

I'm not sure if I fully understand your scenario. So the customer has a card that expired, you try to update the info, and you want that update to fail?

dim jewel
#

Yep, exactly!

#

The update does currently fail, but we don't have a customer in our sub-production environments with an expired card.

maiden raft
#

Do you have the error message that you saw in live when you tried to do this update?

dim jewel
#

Sure. In this case (req_R0LDJCrwRFA87D), it was a payment required.

#

This is from an customer we did have in our sub-production environment, but we don't anymore. This is just an example (it's not always due to the expiration date)

maiden raft
#

Do you have other examples? Unfortunately that error is getting masked by the expiration date error, you can always get that by specifying an expiration month that is in the past

dim jewel
#

That would work. How we can create a new payment method with an expiration date in the past? Keep in mind that the call that generated that request will not be made anymore (as part of the bug fix)

maiden raft
#

Actually wait, is this related to subscription functionality or are you only working with one time payments here?

dim jewel
maiden raft
#

Gotcha, I think you still may be able to simulate this with the test clocks that I linked to. Like you can add the card with an expiry of next month, advance time two months, and see if the error that you are seeing in live happens https://stripe.com/docs/billing/testing/test-clocks