#Vakarm
1 messages ยท Page 1 of 1 (latest)
Hey there
Hi ๐
So you won't receive this info in the callback, you would fetch your server at this point and retrieve the PaymentMethod then return the data you want to your frontend to display it.
Ok but the payment is completed client side.
I understand i could retreive the PaymentMethod through php using some kind of payment reference?
RIght you are going to have to have a server here no matter what so then you would retrieve the PaymentMethod using https://stripe.com/docs/api/payment_methods/retrieve server-side
I already have the server to create the intent first.
Thanks, I'll check it. I guess there is a kind of conf number that I receive from apple pay to get the paymentMethod back from server?
Or do I use the client_secret that I've got when creating the intent?
like in this php example (the link you just gave me)
$stripe->paymentMethods->retrieve(
'pm_1MWFdw2eZvKYlo2CvWcM1Btd',
[]
);
How can I get the key 'pm_1MWFdw2eZvKYlo2CvWcM1Btd' client side?
Yeah that ID is the StripeAPI.PaymentMethod
Specifically you want the Card's last4: https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-last4 @faint elm
So you will see that property when you retrieve the PaymentMethod server-side
thanks for your help, I found the pm__ I should be fine ๐
Nice!