#jm-wallet-react

1 messages · Page 1 of 1 (latest)

vague gorge
#

Hello @cedar tiger. What's a PaymentIntent? Sorry I don't understand what you are referring to

cedar tiger
vague gorge
#

So what's blocking you exactly. Like what have you tried?

#

ah sorry with PaymentElement it just can't work, React or not

cedar tiger
#

Then I should stop using PaymentElement and write all by myself?

vague gorge
#

That's one way. Or just not use that feature, almost no one uses it honestly

cedar tiger
#

What feature almos no one uses?

vague gorge
#

the PaymentItem thingy for Apple Pay

cedar tiger
#

Oh but if I don't add it, when a user pays they see $0 on the browser interface for both Google Pay and Apple Pay

vague gorge
#

No they shouldn't see $0 if you have a clear amount on your PaymentIntent

cedar tiger
#

Is there anything special I need to configure? because they are seeing $0 even if the paymentIntent has a clear amount, even the transaction is successful for that amount

vague gorge
#

do you have a URL I can look at?

cedar tiger
#

Not a public one

vague gorge
#

can you make one?

#

I just tried locally and I don't see $0 in Google Pay, I see the real PaymentIntent amount

cedar tiger
#

With React PaymentElement?

vague gorge
#

React is irrelevant in that case

cedar tiger
#

Did you added the payment items or label to the payment intent?

vague gorge
#

no since it's impossible

#

All I did was create a PaymentIntent for $500, then show it in PaymentElement, click on Google Pay and see $500

#

Just tried Apple Pay, exact same behaviour

#

are you sure you are using a PaymentIntent and setting the right amount?

vague gorge
#

cc @cedar tiger

cedar tiger
#

Yes, I am actually debugging to see the error, but yes, I am creating the intent with the right amount

vague gorge
#

Can you share a screenshot of what you see?

cedar tiger
#

This is what I am getting from the browser, even when the payment intent is configured

#

(I am trying to create a public url for you)

warm creek
#

stepping in on behalf of koopajah. While you're working on sharing the URL, can you also share the PaymentIntent id? it'd look like pi_123

cedar tiger
#

Hello, Alex, sorry for the delay

#

I just notice I am using Setup Intent, could be the reason?

warm creek
#

yes, a SetupIntent has no amount - it's meant to setup the PaymentMethod for future use

#

that's why you're seeing $0

cedar tiger
#

Is there a way to make it show the final amount, still using the setup intent?

warm creek
#

if you want the user to make payment, then you should be using PaymentIntents instead

#

with a PaymentIntent, you can also save the PaymentMethod for future usage using setup_future_usage=off_session

#

and defining the customer

#

a SetupIntent isn't a payment, so you can't make it show the payment amount

cedar tiger
#

I am using a Setup Intent because I need to do some more logic before I do the charge, I am not sure I can use a Payment Intent

#

I mean, I get it, technically I am not charging once the user adds their credit card, but saying $0 is not good ux

warm creek
#

what additional logic do you need to do before the charge?

cedar tiger
#

It is a crowd founding like app, so, if the user gets charged or not depends on multiple factors; but they are "paying" a package with fixed price

cedar tiger
#

Can you confirm if it is impossible to show the amount that will be charged, using Setup Intent?

warm creek
#

yes, it's impossible to show the amount that will be charged using SetupIntent