Stripe Integration in NextJS
Unanswered
Oriental chestnut gall wasp posted this in #help-forum
Oriental chestnut gall waspOP
I am doing integration of stripe in NextJS and I am stucked in createPaymentMethod function of stripe as its not accepting card details.
const paymentMethod = await stripe?.createPaymentMethod({
type: 'card',
card: {
number: cardNumber, // Replace cardNumber with the actual card number entered by the user
exp_month: expMonth, // Replace expMonth with the actual expiration month entered by the user
exp_year: expYear, // Replace expYear with the actual expiration year entered by the user
cvc: cvc, // Replace cvc with the actual CVC entered by the user
},
billing_details: {
name: 'Jenny Rosen', // Example cardholder's name
// Add any additional billing details as needed
},
});