#whimsy_customer-list
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/1304488478242766979
๐ 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.
- whimsy_subscription-event, 16 hours ago, 68 messages
- whimsy_api, 1 day ago, 18 messages
Okay cleaned up, sorry that person was confused and mixed up their thread. Give me a couple minutes to get the on the right track and I'll look at your question
uh i think i might be good i have somehow 2 same customers, ill circle back in a few if i dont manage to fix it
so i guess what im trying to ask, i have 2 customers with same email, and when i use my getAllCustomers (from 2nd image), i get result (from 1st image on the right), which is only one of them, why?
Do you have more than pictures? Exact code in text and exact object ids?
Is the newer Customer object recently created? There's a delay in the Search API
uh yes it was created today
my bad for pictures, what else can i send, that doesnt reveal data here publicly
async function getAllCustomers({ email, limit = 100, startingAfter }: GetAllCustomersQuery): Promise<Stripe.Customer[]> {
const customers = await this.stripe.customers.list({ email, limit, starting_after: startingAfter });
if (!customers) return [];
else if (customers.has_more) return [...(customers.data || []), ...(await this.getAllCustomers({ email, limit, startingAfter: customers.data[customers.data.length - 1]?.id }) || [])];
else return customers.data || [];
}```
not sure if list uses search underhood but yeah, it should return both of those for that email
when was the Customer created exactly? The Search API has a built-in delay https://docs.stripe.com/search#data-freshness of an hour or so
uh i dont know if it an hour ago or not, i can't really check that since it returns only the old object so lol, web dashboard just say november 8th
I mean you can check, you know the Custome rid, you see it in the Dashboard, you can call the Retrieve Customer API and look at created
okay so that's likely why
so .list uses search api same as .search?
ah no sorry, I missed you switched to list.
was always list
okay my bad then sorry. There's no delay then.
Can you share the exact Customer ids cus_123 so I can look please?
whimsy_customer-list
cus_RBHOCbdpOrLea1 (created today, not returned),
cus_PLRRpG7IXrZ0Ie (created awhile ago, returned)
its in test mode
Second Customer is associated with a TestClock and those are not returned by default unless you pass https://docs.stripe.com/api/customers/list#list_customers-test_clock in which case you get only the Customers in that TestClock
uh why is it associated with a TestClock
because i tried to advance sub trough time or?
yes
why does what happen? Sorry you lost me ๐
Our docs for TestClocks are here: https://docs.stripe.com/billing/testing/test-clocks
This is a Test mode feature to simulate time moving forward to test what you see on Susbcriptions in the future
when i try to move its subscription trough time, why does customer uh get directly modified in such way and not stay as it was if im modifying a subscription
Because that's the way "advancing time" works.
interesting
and i was wondering, is there a way to allow some products to have multiple quantity and some to only have 1 when providing users with billing portal page
not something we support at the moment unfortunately
ah rip, so i'd have to do that via api by updating items
yes
so i noticed that when i made a purchase for a subscription, i enter like some credit card info
and then when i make an invoice myself for that subscription after changing items (with proration being on create_prorations), there's no that payment method as default, but its just empty
is there a way to make payment method they enter first when buying default for everything related to their account like invoices and whatever else
i see there is on the dashboard, but where should i trigger that in my code? on subscription create?
(and even after setting it as default, it still isn't offered on invoice hosted page)
you need to set https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method on the Subscription creation
im using checkout sessions, is there a prop there, and when setting that, does it change this: #1304488478242766979 message ?
found it for sessions (saved_payment_method_options), now let me see if it shows up on invoice page
uh i tried to trigger my change of items, but now i got error req_RYz6YdhrKMVNiH for the first time, it worked before
If you are using Checkout we already set the PaymentMethod as the default on the Customer for you though
but it doesnt show on invoice pages
and what's the cause for this tho
What does that mean "it doesn't show on invoice pages"? Sorry can I ask you to try and be more details when you ask each question?
As for that error, the error message looks really detailed to me and tells you what the problem exactly is. The Subcription is now expired, and so you can't update it.
oops sorry just lot going on, basically, i created a checkout sessions, purchased it, and subscription started, then i tried to update its items as you can see in that request and it failed, but how did it expire..?
and as for "invoice pages", after i try to update those items, i create an invoice for the price change, and finalize that invoice, and then i would show that invoice to a user so they can paiy, which is this below (and there is no payment source with which i bought subscription originally via checkout):
Question 1: Subscriptions that are not paid expire after 23 hours. See https://docs.stripe.com/billing/subscriptions/overview#payment-window
You are likely updating the wrong Subscription and mixing up your ids.
You mentioned you have a lot going on and are likely rushing through things trying to make it work. Take a couple steps back and carefully check all the things you are using, log all the parameters and ids and you will see they are not what you think I assume
Question 2: We never show a "saved payment method" on our Hosted Invoice Page so there's nothing you mis-configured.