#ultrapro5000_error
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/1266249375030706196
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, request id is req_9IsAG7Tiv0x8wU
hello! Can you share more on why you're creating a PaymentMethod directly and not continuing on to use a SetupIntent or PaymentIntent?
Hi Alex ๐ sorry but I forgot why. it's for a checkout plugin I built for client like two years ago and trying to fix
what are you trying to fix specifically?
server side handling of the checkout is running even though payment method is invalid
because stripe is returning a payment method id on invalid payment method
looks like I made it to create customer and payment method, then create subscription with those
does your Subscription have a trial?
yes, 30 days
okay, so actually, i wouldn't do what you're doing right now i.e. creating a PaymentMethod. You would typically use a SetupIntent to attach the card to the Customer.
so in your server, you would create a SetupIntent, return the corresponding client_secret to your frontend and do something like
const result = await stripe.confirmCardSetup(clientSecret,
{
payment_method: {
card: elements.getElement(CardElement),
...
okay, thanks for that. are you saying stripe is meant to return a payment method id even if card details are invalid? just due to the fact that I thought I'd be merely adding a coupon code for the client, I'd much prefer not to restructure the approach if possible. Quite sure it was all working as expected before. thoughts?
yes, it's expected behaviour. Stripe only validates basic card format details when you do createPaymentMethod .