#gallopinggoose_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/1377039305331183752
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! I can't see the results of those requests, but I expect it's because the customers were created at markedly different times, and we have changed something in the interim.
Ya, in looking at the Customers, the one with sources was created in 2018, and the other in 2025.
Ah that makes sense I didnt expect customer creation to populate the data differently. I am assuming all (somewhat) new Customers will only have "sources" then?
No, Sources is something that existed from ~2017 to ~2020? and, while they still exist, they haven't been the recommended integration path in a long time.
It looks like you're using some of the newer Stripe frontend stuff that's creating cards, and your older server-side code, which is creating sources.
Ok that's where I'm lost - cus_RsTeyEPWmOtZcd was created in Mar 3 2025, and they are the ones with no "cards" data, only "sources" data. If sources is the deprecated one, wouldn't they still have cards as a new user?
Ah I see, then it is the creation method that is causing the difference, not the age of the customer?
That customer's card (or at least the one I clicked on) was added via the Hosted Invoice Page, and ... I'm not sure why it did that, instead of creating a card, to be honest. Let me dig.
Thanks, appreciate that. Clash of the APIs
...A lot has changed since 2018. 😅
I see it in the logs that cards were added via https://invoice.stripe.com/ using 2020-03-02. So old, but not as old as the 2013 kicking around in our backend
But I think the objects you get back are based on your ~ID~ EDIT: API Version.
Apparently an earlier iteration of Hosted Invoice Pages made use of Sources, and I suspect your account is still using that.
Is this related to https://docs.stripe.com/payments/payment-methods/transitioning ?
I dont believe we host any of our invoice pages, just the stripe hosted ones
Correct.
I just checked, and your account has a flag that causes the Sources-based Hosted Invoice Page to be used.
My link was wrong earlier; is this question related to https://support.stripe.com/topics/shutdown-of-the-legacy-sources-api-for-non-card-payment-methods ?
I suspect this flag was added to your account as part of our transition to Payment Methods-based version a few years ago.
I see. That would make sense because a newly created user adding a new cc as a source (req_q8Bv6hAF02uqw0) even using 2013 API, registers it as both a card and a source so we never noticed it. On the invoice page, maybe with that particular API version, source-based flag just forces it be a source
That sounds feasible, ya.
Even though our backend parses the response to look for "cards" - on the stripe side, the cc is just registered as a source
We've "migrated" in that we use payment intents and look for cards in customers but I guess there is still some legacy sources POSTing going on
You'll need to reach out to Support to get that flag changed: https://support.stripe.com/?contact=true
...And that will likely have to be done carefully/thoughtfully, as I have no idea what fun adventures might occur as a result - though hopefully there will be zero fun adventures, and it will Just Work™.
Thats some good detective work timebox, thanks for your help. Is there any specific term I should refer to it as to help Support better find it and understand the situation?
I'm not just a pretty bird, you know.
And you're very welcome.
In terms of what to tell Support, you can share this link with them, tell them that your Hosted Invoice Page is creating Sources instead of Payment Methods, and you would like to change that - and a little bird [0] told you that requires removing gate(s) from your account.
[0] Couldn't help it ¯_(ツ)_/¯
Of course, I was as clear as mud there. I meant the Discord thread link. Sorry.
Understood, thanks. When these cards will be added as payment methods form the invoice page - will they appear as "cards" in the customer object or a "payment method"? I really need to review the newer api changes
As cards.
Got it. In the new recommended integrations, we should be adding new payment methods (incl credit cards) using https://docs.stripe.com/api/payment_methods and it'll sort itself out in the customer object based on the type?
Wait I thought all of us hate sources now?
I am apparently quite confused. I'm also going to hand things off to my colleague, but they can help you further ... or did we find an answer for you already?
I'd just ask for clarity on how we should be adding payment methods to customers as a best practice, and confirmation that with the flag changed, that cards added on the Invoice page should appear as 'card' entries on the customer object
https://docs.stripe.com/api/payment_methods/attach
If you want to list the available PM's on a customer you can use this.
https://docs.stripe.com/api/payment_methods/customer_list
Got it, so we should really be using Payment_methods above all else
And payment_methods dont appear on the customer object anymore as I can see on the docs, we should be calling for payment methods separately
Correct!
Thank you both @queen yoke and @jolly marsh ! Appreciate your insight and patience when working with us fossil api users