#praveendd25

1 messages · Page 1 of 1 (latest)

half frigateBOT
steel oxide
honest fiber
#

how do i get this in confirm of payment intent API?

steel oxide
#

You mean in client side?

honest fiber
#

yes

#

when i confirm payment i need to get the payment method details

#

earlier it was giving in charge api

steel oxide
#

What would you do with the last4 in frontend? Normally you should only need it on backend

honest fiber
#

we are calling a api to sendemail after confirmation we need for that

steel oxide
#

That should be a backend logic, no?

#

When you receive the payment_intent.succeeded webhook event on backend, that's the perfect timing/place to do any fulfillment logic

honest fiber
#

the payment confirm is happening in front end right

#

so we have written code to get the last4digits and send it back to api

#

is thr any other way to get last 4 digits from elements ?

#

am not using return url method

#

i am expecting success within same form

half frigateBOT
honest fiber
#

and also paymentintent.latest_charge is returning null in stripe.confrim payment

#

this.stripe.confirmPayment({
elements,
redirect: "if_required"
}).then(function (result) {
// Handle result.error or result.paymentIntent
if (result.error) {
$("#div_loader").hide();
}
else {we are taking here result.paymentintent.latest_charge it is null here
}