#Vikram-ApplePay
1 messages · Page 1 of 1 (latest)
Hi there, so you want to defer the PaymentIntent creation after the card details is collected?
yeah similar to that
i cannot rely on frontend data fr card details
since it has security concerns related
OK, here's my suggestion
- When creating the paymentRequest, set
pending(https://stripe.com/docs/js/appendix/payment_item_object#payment_item_object-pending) to true to indicate the amount is pending - In the callback of paymentRequest.on('paymentmethod'), you can get the
paymentMethodfrom the event object - Based on the card's country (https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-country) , create a PaymentIntent that includes additional charges (e.g., EU card it would have be 1.8 + 2.4% , and in case of non-EU card 1.8 + 2.9%.)
- Call
stripe.confirmCardPaymentto complete the payment
Thanks for suggestion let me quick do some r&d on this