#harshitbhargava

1 messages ยท Page 1 of 1 (latest)

timid cipherBOT
devout lichen
#

Hello! So you're using the Payment Element? Can you share a screen recording showing the issue?

kindred niche
#

Sorry, Its little bit difficult to share the screen recording, right now I can provide you PI id

#

yes we are using payment element

#

Can you please check history of Payment Intent Id, and can you please help me out

devout lichen
crystal quest
#

Thank you!

kindred niche
#

I am redirected to cash app pay test page

#

same is happening when I am paying through apple pay or link

#

There?

devout lichen
#

Yep, things just got a bit busy.

kindred niche
#

ok no issues

devout lichen
#

Can you share the code you're using? It seems like you might be calling confirm* functions more than once?

kindred niche
#

UI code?

devout lichen
#

Your client-side code, yeah.

kindred niche
#

For card we are using confirmCardPayment
and for cash app we are using confirmCashappPayment

devout lichen
#

The Payment Method specific funcitons are only used when you're not using the Payment Element.

kindred niche
#

But In confirmPayment we cant send paymentMethodId, suppose we have saved payment method in customer account, then how we can use confirmPayment

#

and one more question when we can use confirmCardPayment and confirmCashappPayment?

tough flower
#

๐Ÿ‘‹ stepping in

#

Give me a moment to catch up

#

Okay so sounds like there is a bit of confusion here

#

Payment Element isn't used to charge stored PaymentMethods

#

If you are going to charge an already-saved PaymentMethod you just create and confirm the PaymentIntent server-side.

#

If you are building an integration that is not using Payment Element and only accepting CashApp, for instance, you would use confirmCashAppPayment client-side when taking a new payment.

kindred niche
#

So basically confirmPayment will work for all type of payment method types.

tough flower
#

Correct when using Payment Element

kindred niche
#

And if we are using saved payment method for payment then we have to use confirmCardPayment and confirmCashappPayment

tough flower
#

Nope, you just use confirm on your backend. You don't use Stripe.JS at all in that case (unless you need to handle 3DS after confirming server-side).

#

That is an example of how you would charge a Card PaymentMethod later after collecting it previously via Payment Element

kindred niche
#

For card i am expecting cvc from customer then how can i confirm from server

tough flower
#

You are recollecting CVC?

kindred niche
#

Yes

#

We are using card element

tough flower
#

Okay let's back up.

#

Are you using Payment Element or Card Element ๐Ÿ™‚

kindred niche
#

Payment element when unknown customer wants to make a payment and. Card element to recollect cvc when known customer come and make a payment because we already have payment method of that customer

tough flower
kindred niche
#

Yes i am using that only.

#

And can you please tell me why i am redirecting to cash app test authorize page when i am doing payment through apple pay, us bank account or link?

#

It is because i am using 2 confirm method in payment element , first one is confirm payment and second one is confirmCashappPayment?

tough flower
#

Yep

#

You should only be calling confirmPayment

kindred niche
#

Ok thanks

tough flower
#

Sure

kindred niche
#

And one more thing i want to ask suppose I have saved payment method of cashApp and when i am doing payment by using confirmCashappPayment it is not redirecting me to test authorize page it is directly confirming my payment

tough flower
#

Correct. If you set up the PaymentMethod for future use properly then the customer shouldn't need to authorize it again.

kindred niche
#

But as far as i know cash app is wallet.. when we are deducting any amount from customer wallet we should authorize first

tough flower
#

CashApp can be used for recurring purchases just fine as long as you get consent from your customers

kindred niche
#

Ok