#javier_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1230139901832462369
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
do you already have a PaymentMethod saved for the customer, or you need to collect one?
Hello!
I already have the PaymentMethod saved yes, I only need to generate a charge that will be created with a cronjob
๐ how exactly was the PaymentMethod saved? Also, what test card are you using?
We have docs that explain how you can charge already saved payment method here: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements#charge-saved-payment-method
Additionally, it is possible for an issuer to require 3DS auth check for an already saved payment method. In which case you'd need to confirm the payment intent client-side by bringing the customer back on-session.
Hi @slow girder
I've tested this in production env, and I did it with my own card, so I'm sure my bank didn't request me an authentication, and what is odd is that I'm able to create the charge directly in the stripe console but not from the paymentIntents.create function.
We typically recommend against using a live card for test purposes. Card networks are really strict about that.
How did you save the payment method?
I saved it with setupIntet using Tap to pay
Also just noticed that your code has setup_future_usage: 'off_session',
You only need that if you're trying to store a payment method while taking the payment.
You don't need it to charge a saved PM
Can you try removing that and test again?
There's no payment when we saved the payment method, we only create a later (like days) charge if the customer do a specific action...
Yeah I get that. However, the code you shared is passing setup_future_usage when charging the pre-saved payment method.