#icurrytheteam
1 messages · Page 1 of 1 (latest)
hello! can you elaborate more on the default payment method is being recorded under source instead - where do you see this?
I'll use stripe.Customer.retrive("{{CUSTOMER_ID}}") to get a customer. My response looks like the following:
https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer’s invoice_settings.default_payment_method or default_source.
you'll need to check both parameters when you attempt to retrieve the default payment method
So if I wanted to query the paymnt method below from a customer, id need to check both fields? I'm asking because I'd like it if we can automatically charge the default payment method when a user subscribes to a vendor.
For example, if a user has a default payment method, then they would click on a button that says subscribe and it would auto-charge that card for a subscription.