#Jordy
1 messages · Page 1 of 1 (latest)
This chat is focused on developers and technical questions related to Stripe products. Is your question related to Stripe?
If there is an error with the request sending to Stripe API, you should wrap Stripe's functions with try-catch block. Are you implementing Stripe API directly or through third party?
Right now, third party but I'm famililar with the stripe api
It's being built through stripe.js in a no-code platform called bubble.io
If you're using third-party (in this case bubble.io), you probably don't have the access to Stripe API functions for you to handle try-catch block directly. In the event if you do have the access, the example of try-catch on Payment Intents API on Node (https://stripe.com/docs/api/payment_intents/create?lang=node):
try {
const paymentIntent = await stripe.paymentIntents.create({
amount: 2000,
currency: 'jpy',
automatic_payment_methods: {enabled: true},
});
} catch (error) {
// Handle error
}
For Stripe.js (frontend/client side), here's an example code about how you can handle the error with stripe.confirmPayment: https://stripe.com/docs/js/payment_intents/confirm_payment