#miriana
1 messages · Page 1 of 1 (latest)
yes
If you look at the PaymentIntent, it should contain the payment_method used. And you could compare that payment method ID with the payment method the customer had previously.
where can I get the payment intent ? is it from frontend or backend?
You can definitely get it on the backend. For the frontend I'm not sure, let me double check.
please
From the frontend you would make an HTTP request to this endpoint to get a PaymentIntent using its ID and client secret: https://stripe.com/docs/api/payment_intents/retrieve#retrieve_payment_intent-client_secret
http request to stripe?
yes
Did you retrieve the PaymentIntent after the payment was made?
no no I was just checking the sample
If there was no payment, then it's expected that "payment_method": null
ok but on usual cases there should be a payment method
What do you mean by "usual cases"? If the status of the PaymentIntent is succeeded, then yes there will be a payment method set.