#sinduri-charges

1 messages · Page 1 of 1 (latest)

granite surge
shadow plinth
#

Sorry i am not clear

#

If i am saving customer id to databse, and next time select a saved card of the customer to pay how to identify the selected card if the customer attached to multiple cards

granite surge
#

not sure what you mean unfortunately.

#

you list the customer's payment methods with https://stripe.com/docs/api/payment_methods/list and if you can see the details like brand(visa/mastercard) and the last 4 digits so you can use that to show the customer the details of the card so they can pick one, if that's what you mean.

shadow plinth
#

if the customer pick a card out of several card, how cal i identify which payment method is the customer selected for charging.

#

i am using payment intent API, for charging a saved card need to pass customer_id and payment_method_id to intent API.

How ti identify payment_method_id of selected card, if the customer_id attached to multiple payment_method_id

granite surge
#

how cal i identify which payment method is the customer selected for charging
your question seems kind of backwards

#

like they selected a card right? So you wrote code for letting them do that.

#

so you already know what they selected because they just selected it.

#

again :
you list the customer's payment methods with https://stripe.com/docs/api/payment_methods/list and if you can see the details like brand(visa/mastercard) and the last 4 digits so you can use that to show the customer the details of the card so they can pick one, if that's what you mean.
is that the part you're missing?