#ilyeselb
1 messages · Page 1 of 1 (latest)
Hi there!
You can check the default payment method of the customer here: https://stripe.com/docs/api/customers/object?lang=php#customer_object-invoice_settings-default_payment_method
but the default payment method and attached payment method are the same ?
like if i want to retrieve for my user the payment methods that he saved and not the one saved on the subscription
because we save the default pm on subscription for future payment
I'm not sure I understand your question.
- If you want to list all payment method of a customer, use https://stripe.com/docs/api/payment_methods/list with the
customerparameter set - If you want the default payment method of the customer, use https://stripe.com/docs/api/customers/object?lang=php#customer_object-invoice_settings-default_payment_method as mentionned above
- If you want the default payment method for a specific subscription, use https://stripe.com/docs/api/subscriptions/object?lang=php#subscription_object-default_payment_method
if i save default payment method on subscription , it save it to the customer too
some of them i dont want to retreve them to the user on the checkout
if i save default payment method on subscription , it save it to the customer too
That's correct
some of them i dont want to retreve them to the user on the checkout
I don't understand what that means
What does "to retreve them to the user" means?
And "checkout" is it Checkout Session or something else?
i mean like this for exemple
here even if i dont select this it save it and retreive it like this
I have no idea what these screenshots are, sorry.
Can you give me more context on what you are trying to do?
in every payment form we have this save card if you want
and then retreive it to the user in futture usage
now on susbcrtipn creation we save default pm
but event if i dont want to retreve it its there because its saved as default pm on the custumer
👋 taking over for my colleague. Let me catch up.
okay
what's the ask here?
i explained up
you can add some metadata on the PM and then once you retrieve the PMs you can filter based on whether this metadata exists or not
let me know if you need any more help