#moustache_dashboard-created-paymet-methods
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1375172720089632838
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- moustache_api, 3 hours ago, 18 messages
Hi ๐
Thanks for all the object IDs. I'm taking a look now.
This payment method was added using the Stripe Dashboard. It created a card object but this is fully compatible with Payment Methods.
In [10]: stripe_data = stripe.Customer.retrieve(c.stripe_id, stripe_account = client.stripe_account_id)
In [11]: c.stripe_data['invoice_settings']
Out[11]:
{'footer': None,
'custom_fields': None,
'rendering_options': None,
'default_payment_method': None}
and the invoice_settings just dont apply in this case?
As you can see from the event type emitted, we fired a payment_method.attached event: https://dashboard.stripe.com/events/evt_1RRFZ3FmfYMJ873aRd8Y4S2a
This was NOT saved as the default payment method
It was only attached to the Customer
It shows it is "default" in the dashboard, but my API call shows no default_payment_method in invoice_settings
It does show up as a Customer Source but, again, this was created via the dashboard so I don't have much insight into why it was done this way.
We don't focus on the Dashboard here because neither users nor we have insight into or control over the code being run.
This server is focused on developers coding integratons with the Stripe API.
One approach you might consider is this:
- Listen for the
payment_method.attachedwebhook event: https://dashboard.stripe.com/events/evt_1RRFZ3FmfYMJ873aRd8Y4S2a - Update the Customer object to set the saved Payment Method as the default: API ref
ok, so I listen to payment_method.attached, if it is default_source instead of default_payment_method, I make it a payment method instead of a source?
You can use the ID , in this case card_1RRFZ1FmfYMJ873aNNbvhE8h, to set that as the default payment method.
ill try, stand by....
๐
ok, that worked, thank you
Awesome ๐ , happy to help ๐