#InstaTrigger
1 messages ยท Page 1 of 1 (latest)
hello! can you share the customer id?
cus_N8VR5uplOXPaZJ
can you share your code to retrieve the default payment method for this customer?
I'm using bubble.io so it looks weird but this is the API set up I'm using. Like I said it works for cards but I can't figure out why not for bank accounts
can you also paste the response? i assume this is in test mode and there's no sensitive data
the bank account is there in the default_payment_method
Do I need another call then to determine if that paymetn method is a card or bank? When it is a card it will tell me "card"
you can expand that field in your request to have the response provide more info : https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok thanks I will try that. Can I reply to this chat later on to continue it or would I start a new one?
this thread will be closed after a while, if it's still open when you're back you can continue here, otherwise you can ask again in the main channel ๐
OK I got it to work. Is there a reason why when a customer sets their default as a card it uses default_source but when it's a bank it uses invoice_settings.default_payment_method ?
Hi @clever geyser I'm taking over
Are you setting the default_source or invoice_settings.default_payment_method by yourself or through any 3rd-party plugin?
by myself in the Stripe dashboard for a test customer
by clicking the customer and going to add a payment method
OK, so you created it from Dashboard.
The Dashboard is still using Sources API for card payment methods, and that's why it set it to default_source.
So when I go live my customers will only use the portal to add their payment method, so I should expect that same behavior?
If i remember correctly the billing portal uses PaymentMethod API and set the default payment method to invoice_settings.default_payment_method. You can test it out yourself in test mode.
Well now the problem is if I first set their default to card, then add a bank account and make that the default, I can't tell which is the actual default the customer wants as this is produced
basically showing both default_source and invoice_settings.default_payment_method are filled
Can you tell what you want to achieve here? or what problem are you trying to resolve?
I'm trying to determine what a customer's default payment method is so I can decide if I need to charge their card or do a payment intent to charge their bank
I use the charges API for cards and payment intents for banks since I guess you can't use charges for banks
They enter their default method on the portal but I'm not using a Checkout session
You can use PaymentIntents API for both cases.