#mrmarcondes

1 messages · Page 1 of 1 (latest)

old fableBOT
eager plaza
#

How are you collecting these payment methods? eg, using which integration pattern?

sturdy cypress
#

Hi @eager plaza , these are the overall flow we are using

#

addind @sonic geode to this thread.

sonic geode
#

Hi! I'm the front end dev for this project

eager plaza
#

Are you using the payment request button or the payment element here for getting the wallet payment methods?

sonic geode
#

Payment Element

eager plaza
#

Payment Element doesn't currently support this, though I've shared your feedback about this and want to control the pending amount 🙂

#

If you share your account ID I can tie that to the feedback for future outreach

sturdy cypress
#

How can we achieve this? I mean, we need to have a 100%off discount feature and also allow GooglePay and Apple Pay. Should Frontend work with setupIntent when the customer applies a 100%off and with paymentIntent otherwise?

eager plaza
#

What are you trying to achieve, specifically? Perhaps I've misunderstood. Yes, you need to determine whether payment or setup is needed based on the final amount and future use needs.

#

If there is no payment required now, but you need the payment details for later, yes thats what setup intents are for

#

If you're colelcting a payment now you would use a payment intent

sturdy cypress
#

ok. We have two scenarios:
first one: how can I create a paymentIntent with an amount equal to 0.00, as we offer 100%off to our customers. (as I understand we need a paymentIntent to be able to setup googlepay correctly)

#

scenario 2: as I know we cannot use paymentIntent to collect 0.0 amount, we must use setupIntent to accomplish that, right?
Ok, using setupIntent, how can I set the value on Google Pay?
It seems I have to use both paymentIntent when I have amount > 0 and setupIntent for amount = 0.

This turns our development flow unnecessarily complex.

#

Now, we are using setupIntent for both

eager plaza
#

how can I create a paymentIntent with an amount equal to 0.00
You can't. Payment Intents must be over the minimum charge amount for the relevant currency: https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts

as I know we cannot use paymentIntent to collect 0.0 amount, we must use setupIntent to accomplish that, right?
Yes, that's right.
how can I set the value on Google Pay?
The pending payment value? You can't via payment element, currently. You can do this with the payment request button, but I don't recommend using that if you're already using payment element.

See what currencies you can use for making charges and for paying out to your bank account.

#

You should not use setup intent when you intend to take payment right away

#

You should use a payment intent with setup_future_usage

#

Yes, you need to handle the logic branching of payment vs no payment up front to choose payment intent vs setup intent

sonic geode
#

What's the idea using setup_future_usage ?

eager plaza
sonic geode
#

oh, ok. So the only way to do this is switching between setupIntent (if the total is 0) and and paymentIntent (if the total is more than 0) on the Front End side, and handling both on the Back End side, right?

eager plaza
#

Correct

old fableBOT