#teelu_api

1 messages ¡ Page 1 of 1 (latest)

fallen larkBOT
#

👋 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.

twin delta
#

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

glacial sentinel
#

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

twin delta
#

Just to clarify, cus_LCyEBbjnAoV3oY is the customer ID you're looking at correct?

glacial sentinel
#

correct

twin delta
#

that customer has pm_1SoqcLLZ1kEeNsfjDywykaMU set as default_payment_method under invoice settings

glacial sentinel
#

i just adjusted that now, but prior, if you look at the events, the card was still there

twin delta
#

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

glacial sentinel
#

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

twin delta
#

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

glacial sentinel
#

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

twin delta
#

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.

#

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

glacial sentinel
#

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