#Surya-Mani
1 messages · Page 1 of 1 (latest)
hi, what is the question exactly?
I need to display the payment method. which API is used for get the payment method?
ok
the payment methods are get by only customer id or subscription id
not sure what you mean.
if i retrieve the payment method of one user how should i get the method by using subscription ID am i right?
sorry I can't understand you.
How should i get payment method
sorry, you make no sense.
do you have some code that you've tried and have a question about?
i need to get name of the the user, card details and expiry date
those are fields in the PaymentMethod object. e.g. https://stripe.com/docs/api/payment_methods/object#payment_method_object-card
you use https://stripe.com/docs/api/payment_methods/customer_list to list a Customer's PaymentMethod objects, and then in the response you can inspect those fields.
Yes.
i also do the same one
so i need to get the user name , card detail and expiry date of that card
did you understand my requirement?
yes, and I gave you an answer.
have you tried it out? what happened when you tried to write some code to implement this?
wait i will recheck it once
i will use the API but it not recommend the object to get the details
that code makes no sense
I'm sorry but I don't understand how you took the answer I gave and wrote that code. This is nothing to do with PaymentSettings, that is entirely unrelated.
what is the error in that code
there's no error, but it doesn't get a PaymentMethod or anything like it.
yes
it is retrieving the value of this part of the Subscription object (https://stripe.com/docs/api/subscriptions/object#subscription_object-payment_settings) and returning it, which doesn't seem like what you wanted.
I'm not sure what I can add to what I already explained to you.
maybe start by writing some code to call https://stripe.com/docs/api/payment_methods/customer_list ? 🙂