#mentjim-checkout
1 messages · Page 1 of 1 (latest)
For the last question, it should be pm_xxx
For the first question, default_source should be enough, although it will be looked after other fields. Documented here: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hm ok, so what's the best way to query out all the pm_ids for a customer? I try with /payment-methods?customer=cus_123 but it requires a type. If we set that to card we only get the card_123 id's and not their parent object id?
Or actually, the documentation (https://stripe.com/docs/api/payment_methods/list) suggests that the id is of "pm_123" even though that the type is card but that is not the case when we hit the api for real. Then the id is "card_123".
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes card_123 could also be the Payment Method ID AFAIK
Listing PaymentMethod does require the types parameter specified
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hm ok, so can the invoice_settings.default_payment_method be a "card_123" id then on the customer object?
Hey, sorry missed this. You'd need to use the default_source parameter on the Customer object I believe: https://stripe.com/docs/api/customers/update#update_customer-default_source
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Just reading up on the earlier conversation to understand the problem
Can you share share the ID of the Customer object?
Will try to set that default source id, whatever it looks like. Thanks for the help
How are you creating your Subscriptions?