#eric.ho

1 messages · Page 1 of 1 (latest)

violet rootBOT
rough lake
#

Hi,
do you want to use server-side payment confirmation?

#

are you using the Card/Charge API ?

#

currently and you want to migrate to PaymentMethod APIs?

vivid tendon
#

yes, we want to use server-side payment confirmation. Our originally flow works like:

  1. Create a PaymentIntent
  2. Pass client_secret to client
  3. Collect card details with Element

But now we want to adjust the amount in the paymentIntent according to the card's country, so that the user pays for Stripe's service fees, instead of us paying for them. That's why the above flow doesn't quite work for us

#

Ideally, our new flow is something like:

  1. User input card details
  2. Server creates PaymentIntent with adjusted amount
  3. User authorise us to charge their card
  4. <We do something that possibly is time-consuming>
  5. When 4. is done, we confirm the txn
rough lake
vivid tendon
#

Is it secure to just update the payment intent amount? I have thought of it but isn't the client_secret the only thing required for the client to confirm the transaction?

#

On the other hand, is there something that stops us from just increasing the amount to something unreasonable without the user noticing it?

rough lake
rough lake
vivid tendon
#

We can update it even after it is confirmed by the user?