#konseqwential-react-card-element

1 messages · Page 1 of 1 (latest)

slate ridge
#

Hi there! Which card number specifically are you entering that isn't getting declined?

#

And can you provide a PaymentIntent ID using that card number?

fluid sky
#

I would say pretty much all the test card numbers in the docs do not get declined. I am doing this in a test environment and making a call to stripe.createToken after i gather the card information through a form UI

#

Some specific examples I tried are 4000000000009995 4000000000009987

slate ridge
#

Ah okay so thanks for the info. When you create a token that doesn't trigger an authorization with the bank so the card won't get declined.

#

These test cards are based on a fake "issuer response"

#

This only happens when you attach a token to a customer or when you attempt to charge the token

fluid sky
#

Interesting, would that be true for examples that use the PaymentElement as opposed to CardElements? Because I do see the card get declined for this example in the stripe docs https://stripe.com/docs/payments/quickstart only difference however between this UI example here (see preview in link) and what I have in my test environment is that it uses the PaymentElement whilst mine uses CardElement.

slate ridge
#

Yes with PaymentElement you are charging the card

#

Or you are using a SetupIntent

#

Which also triggers a bank authorization

fluid sky
#

That makes a lot of sense. I guess that leads to ask, at what point in the flow does a bank authorization occurs when using CardElements or the ChargesAPI?

slate ridge
#

See above — when you attach the token to a customer or when you charge the token (use /v1/charges).

#

Why are you using tokens though?

#

You should use the PaymentMethods and PaymentIntents API

#

You can do this with card Element as well

fluid sky
#

Oh i would so love to use the PaymentIntents API, I am dealing a bit with legacy code at the moment and we have plans to migrate soon. Thank you however for the prompt response!

#

This helped clear my confusion