#jm-wallet-react
1 messages · Page 1 of 1 (latest)
Hello @cedar tiger. What's a PaymentIntent? Sorry I don't understand what you are referring to
I am using PaymentElement with React and I would like to add PaymentItems (https://stripe.com/docs/js/appendix/payment_item_object) to it, in case a user decides to pay with Apple Pay or Google Pay
So what's blocking you exactly. Like what have you tried?
ah sorry with PaymentElement it just can't work, React or not
Then I should stop using PaymentElement and write all by myself?
That's one way. Or just not use that feature, almost no one uses it honestly
but yes if this is crucial you should use https://stripe.com/docs/stripe-js/elements/payment-request-button
What feature almos no one uses?
the PaymentItem thingy for Apple Pay
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
No they shouldn't see $0 if you have a clear amount on your PaymentIntent
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
do you have a URL I can look at?
Not a public one
can you make one?
I just tried locally and I don't see $0 in Google Pay, I see the real PaymentIntent amount
With React PaymentElement?
React is irrelevant in that case
Did you added the payment items or label to the payment intent?
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?
cc @cedar tiger
Yes, I am actually debugging to see the error, but yes, I am creating the intent with the right amount
Can you share a screenshot of what you see?
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)
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
Hello, Alex, sorry for the delay
I just notice I am using Setup Intent, could be the reason?
yes, a SetupIntent has no amount - it's meant to setup the PaymentMethod for future use
that's why you're seeing $0
Is there a way to make it show the final amount, still using the setup intent?
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
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
what additional logic do you need to do before the charge?
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
Can you confirm if it is impossible to show the amount that will be charged, using Setup Intent?
yes, it's impossible to show the amount that will be charged using SetupIntent