#harshitbhargava
1 messages ยท Page 1 of 1 (latest)
Hello! So you're using the Payment Element? Can you share a screen recording showing the issue?
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
The only thing I can see on my end is when you confirmed that Payment Intent using CashApp in this request: https://dashboard.stripe.com/test/logs/req_WwNJjjGZcijGWC
Thank you!
I am redirected to cash app pay test page
same is happening when I am paying through apple pay or link
There?
Yep, things just got a bit busy.
ok no issues
Can you share the code you're using? It seems like you might be calling confirm* functions more than once?
UI code?
Your client-side code, yeah.
For card we are using confirmCardPayment
and for cash app we are using confirmCashappPayment
If you're using the Payment Element you should only be calling confirmPayment: https://stripe.com/docs/js/payment_intents/confirm_payment
The Payment Method specific funcitons are only used when you're not using the Payment Element.
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?
๐ 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.
So basically confirmPayment will work for all type of payment method types.
Correct when using Payment Element
And if we are using saved payment method for payment then we have to use confirmCardPayment and confirmCashappPayment
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
For card i am expecting cvc from customer then how can i confirm from server
You are recollecting CVC?
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
Okay that makes sense. In that case, yes you can just confirm client-side using confirmCardPayment, however you don't need to collect the full card details again. You can just pass the PaymentMethod ID to your client and use the cardCvc Element as it is an easier flow for your customers. See: https://stripe.com/docs/payments/save-during-payment-cards-only?platform=web#web-recollect-cvc
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?
Ok thanks
Sure
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
Correct. If you set up the PaymentMethod for future use properly then the customer shouldn't need to authorize it again.
But as far as i know cash app is wallet.. when we are deducting any amount from customer wallet we should authorize first
CashApp can be used for recurring purchases just fine as long as you get consent from your customers
See: https://stripe.com/docs/payments/cash-app-pay/set-up-payment?platform=web&ui=API#present-authorization-terms where we talk about how you should indicate that you will charge your customer in the future if you are going to go that route
Ok