#shrey-CardError

1 messages ยท Page 1 of 1 (latest)

serene temple
#

Hi there, which test card are you using?

fierce swan
#

The one that requires authentication, 4000 0027 6000 3184

#

This is from the error that I've logged in my backend
requestId: 'req_7nf7w4I4Uhr9VQ'

serene temple
#

OK, let me take a look, one sec

fierce swan
#

Sure ๐Ÿ™‚

serene temple
#

Hi @fierce swan the test card that you use is for PaymentIntent API, but you are using Charge API.

#

And we strongly recommend all our users to use the PaymentIntent API.

fierce swan
#

With PaymentIntent API, can I allow the user to select the amount he/she wants to pay? Since it's donations I'm accepting, I don't want it to be a fixed amount. That's the reason I'm using Charge

serene temple
#

You can create a new PaymentIntent after user has chosen the amount.

#

So here's a flow I'd recommend

  1. Let your customer choose the amount
  2. Create the PaymentIntent at your backend
  3. Pass the PaymentIntent clientSecret to frontend so that you can use it to render the payment element
fierce swan
#

Okay. I think I found the right docs NOW. Thanks, it's amazing that a person working for Stripe is actually helping me here. ๐Ÿ˜

serene temple
#

You are most welcome, feel free to drop by if you have any questions