#teelu_api
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/1460360891844530414
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Detaching the payment method should render is ineligible for future payments.
Are you still able to charge it via a Subscription?
Also, the card_ object you've detached is a separate payment method from what the customer has under invoice_settings
So this is expected
Here are the events of the card being deleted, evt_1SiepfLZ1kEeNsfj9XKaIKUm, the payment method being detached, evt_1SiepfLZ1kEeNsfj8AhE5C9i, and the customer being updated evt_1SiepgLZ1kEeNsfjj5IdFvor, yet the card id is still the default payment method for invoices for the customer
Just to clarify, cus_LCyEBbjnAoV3oY is the customer ID you're looking at correct?
correct
that customer has pm_1SoqcLLZ1kEeNsfjDywykaMU set as default_payment_method under invoice settings
i just adjusted that now, but prior, if you look at the events, the card was still there
Can you try detaching that pm_xxx object and see if you can reproduce the issue?
I wonder if this is a Source vs Payment Methods API thing
evt_1SoqkLLZ1kEeNsfjFiZ5pOt9 this is me updating it and the previous value was the card
i did try to reproduce in test mode, but adding cards through the stripe ui or backend now produces a payment method, not card. I think the issue is when a card is removed (not a payment method), it doesn't update the invoice settings correctly by clearing it
it only removes the card from the default_source field on the customer
Gotcha. I believe this is most likely expected behavior..
card_xxx objects were created using Sources API. Back then, invoice_settings.default_payment_method parameter didn't exist. default_source was the field that was used to charge the customer.
I think this is a quirk of using object created with Sources API along with Payment Methods API
Understandable, but if the card_xxx can be assigned to the default_payment_method, i would assume it should clear out that field as well as the default_source when its being detached?
Just wanted to verify as we've assigned some cards to default payment methods
that's a fair point
Ah looks like the card was automatically updated prior to getting detached. I suspect that might've messed up something for the card ancestry as well.
Can you give this a try? - https://docs.stripe.com/api/cards/create
You can create a card_xxx using the API and use that to reproduce the issue
I'm trying as well but your test might be faster
Okay I just checked and the default_payment_method did get cleared for me when I detached a card_xxx object from the customer
So I suspect this is an issue with Card Automatic Updater - https://docs.stripe.com/payments/cards/overview#automatic-card-updates
When the card was updated, it likely updated some customer <-> payment method relationship
Hmm interesting, Thanks for taking a look at that @twin delta. Appreciate the insight and deep dive. If it comes up again, i'll be sure to reach out in case its from the automatic card updater