#asdfgh-rates

1 messages · Page 1 of 1 (latest)

knotty palm
#

👋 happy to help

#

I didn't quite follow what you are trying to achieve, could you please explain?

glad spire
#

Okay, maybe I will present my use case

#

Lets say that the price is not fixed for the user and it increases with time

#

The price starts from zero

#

And user can pay in any moment

#

So if price is lower than the minimum amount of the payment intent user will not pay at all

#

And if it is higher, I want to present payment sheet

#

And I want to check in some way if the current price is enough to create payment intent

#

The problem is that I would have to check it for each currency and I would have to use api for the exchange rates

#

So maybe there is an easier way?

#

Maybe I can catch specific Stripe exception which says that amount for payment intent is not enough and then fulfill the user payment for free

knotty palm
glad spire
#

Yes, I have seen that, but that doesnt solve my problem

#

I think that checking for each currency is not a best way to do it

#

And what if Stripe will change that in future?

#

I dont want my code be dependent on this list

knotty palm
#

unfortunately that's not possible using the APIs today

glad spire
#

Understood

#

And what about exception

#

Can I check somewhere which exceptions throws create payment intent method?

knotty palm