#Vikram-ApplePay

1 messages · Page 1 of 1 (latest)

modern escarp
#

Hi there, so you want to defer the PaymentIntent creation after the card details is collected?

quiet bough
#

yeah similar to that

#

i cannot rely on frontend data fr card details

#

since it has security concerns related

modern escarp
#

OK, here's my suggestion

  1. 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
  2. In the callback of paymentRequest.on('paymentmethod'), you can get the paymentMethod from the event object
  3. 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%.)
  4. Call stripe.confirmCardPayment to complete the payment
quiet bough
#

Thanks for suggestion let me quick do some r&d on this