#dick-flair_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/1395400096668975245
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi @last whale . I'm not sure if I've selected the appropriate category really but API seems best fit for my query
I have a customer in test mode who did have a monthly subscription
https://dashboard.stripe.com/test/customers/cus_ShFmp0ewoN5GFr
But has now been cancelled due to failed payments (this is intentional, I am testing failed payments at the moment)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
As you can see, that customer is still on stripe
But when I fetch the customer via email using this:
https://docs.stripe.com/api/customers/list
It returns null
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
My question is, does it only fetch actively paying customers from the API?
Another way I checked was rather than passing an email parameter. I checked the result for all of the result from stripe.customers.list and I couldn't find the user I was looking for in the list
Hi, no it should still return the customer. They do not need a payment/ active subscriptions no.
I see you have many more customer: https://dashboard.stripe.com/test/customers
Can you confirm you're using the correct test mode API key when you make this call?
I am yes, 2 seconds, let me just trigger the fetch again and look in the logs
Hmm, it doesn't seem to be returning a body for some reason, i'm not sure if this is correct or not but this is the request to fetch the customer via the email
req_H9fPk9UcUj2eii
Can you try it with https://docs.stripe.com/api/customers/search?api-version=2024-09-30.acacia ? This is out Search API for Customers to achieve what you're looking for. Let me try using the same code as you on my end
Will try now, 2 mins
Okay yep, so that seems to work using that method but I don't understand why the initial method of .list doesn't seem to work.
I'm not opposed to using this search method but yeah, don't quite get why this is the case
Can you try that List method with a customer id that is not using Test Clocks? I see you're using test Clocks with cus_ShFmp0ewoN5GFr so I'm trying to see if that has an impact
Okay yep, it seems to be OK for customers not using test clocks
Interesting that the search method works regardless of test clocks being used
Good to know though
Ah, I've just realised there is a test_clock parameter in the docs for list too. Should have checked that to begin with, oh well
I guess while I've got you, what is the value meant to be for the test_clock parameter, is it the test clock ID? If so, I'm not quite sure where to grab that
That is the ID of the test clock: https://docs.stripe.com/api/customers/create?api-version=2024-09-30.acacia#create_customer-test_clock
Sorry, I meant on the dashboard, is it not possible to get a hold of that without using the API?
In the same way where I can get the subscription or customer ID from the dashboard
I do not know much about the Dashboard as we're developers who can help with the API/ integartion with Stripe
I can look in the Dashboard
No worries
I think I can just dig through the logs and find it via that
I'll end it there
Appreciate the help
OK, sounds good
Thanks!