#florin_code

1 messages ยท Page 1 of 1 (latest)

willow fiberBOT
#

๐Ÿ‘‹ 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/1314152994803286017

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

gaunt linden
#

if (
paymentIntent.status === 'requires_action' ||
paymentIntent.status === 'requires_confirmation' ||
paymentIntent.status === 'requires_payment_method'
) {
return ctx.send({
clientSecret: paymentIntent.client_secret,
orderId: order.id,
message: 'Additional authentication is required',
});
} else if (paymentIntent.status === 'succeeded') {
return ctx.send({
orderId: order.id,
message: 'Payment succeeded!',
});
} else {
return ctx.send({
error: true,
message: 'Payment intent creation failed or requires confirmation',
});
}
} catch (error) {
strapi.log.error('Error creating OneTimePayment', error);
return ctx.throw(500, error.message);
}

this is what I send to my frontend based on the paymentIntent status

shadow thunder
#

Can you share an invoice ID (in_xxx), so that I can take a look?

gaunt linden
#

in_1QSaebKCK5mmw7xENEorn0wV

#

for which case? the one where I am using a save payment method? or the one where I am trying to use a new one

shadow thunder
#

in_1QSaebKCK5mmw7xENEorn0wV had default_payment_method set during the invoice creation. From the invoice perspective, it looks fine to me.

#

If in_1QSaebKCK5mmw7xENEorn0wV used the saved payment method, I don't see any issue here

#

The test cards https://stripe.com/docs/testing are meant to simulate the real card, so it should work the same in production as well

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

gaunt linden
#

thanks

shadow thunder
#

No problem! Happy to help ๐Ÿ˜„