#useRef
1 messages · Page 1 of 1 (latest)
hi! can you share the exact frontend Javascript code that you call that is resulting in that error?
and also a PaymentIntent ID pi_xxx where you had this problem
does just confirmPayment(clientSecret) work?
actually , sorry , confirmCardPayment(clientSecret) . You want this overload : https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-attached (not 100% sure how you invoke that from our React library, but that is what you'd use here)
actualy confirmCardPayment do not exist in the react native library
what make me worry that saved payment works with subscription in the front handleCardAction(clientSecret)
ok, I didn't know this was React Native
just do this:
const {error} = await confirmPayment(clientSecret, {
paymentMethodType: 'Card',
paymentMethodData: {
billingDetails,
paymentMethodId: "pm_xxxx"
},
});
```
(pass the pm_xxx back from your backend server). That's the easiest way and it works
thank you so much it works like sharm when we add paymentMethodId