#erluxman_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/1481259633124573326
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Sorry I couldnt add all the details due to text's length limit on the form
hey there ๐ is there a specific value (i.e. an account ID) that you expected to be returned by your Search API call?
also could you share the request ID (req_123) for the Search call?
no worries!
sorry I was a bit unclear, I meant to ask if you could share the account ID that you expected to be returned, so we can double check the details on our side
the problem isn't that it returns wrong or doesnt return at all, it says the search api isn't even available so you mean my account id not the connected user;s id right?
acct_1NgfRHG6b521Lrze
this is my account id
what if you search the email in your dashboard - do you see a connected account then?
(I'm not suggesting this as a solution, I just want to understand if you actually have a connected account with that email - then we can work on an API-based solution)
perfect, thanks
that looks like you only have a customer profile associated with that email, rather than a connected account
so if you called List Customers with an email param, the object would be returned:
https://docs.stripe.com/api/customers/list#list_customers-email
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
so lets try this one
curl -G https://api.stripe.com/v1/accounts/search \ ๎ถ โ โโโ
-u "sk_test_51NgfRHG6b521LrzeeqGjN1eFyPpzjAxAi7GUPzDRvYH3DJbOgLrDOU5e3rTCjZyfGQA4G7Ye8OvV85rFwIHkfGax00jXBSarHO:" \
-d query="email:'bridzan1@bridzan.com'"
{
"error": {
"message": "The provided key 'sk_test_***********************************************************************************************arHO' does not have access to account 'search' (or that account does not exist). Application access may have been revoked.",
"type": "invalid_request_error",
"code": "account_invalid",
"doc_url": "https://stripe.com/docs/error-codes/account-invalid"
}
}
I still face the same issue for this email as well..
๐ Hi there! I'm taking over for my colleague. Let me take a look
Sure Arran..
welcome to the thread
do you get the problem? or can i help you in any ways to understand it better?
please reply, i will eat.. i will join you
Yeah, no worries
Thanks for sharing the request/response. Despite the confusing error message, the issue here is that we don't have a /v1/accounts/search endpoint
You would need to use the list endpoint for connected accounts, and then check whether the email attribute matches: https://docs.stripe.com/api/accounts/list
can you provide a curl command i am afraid i tried this
curl -G https://api.stripe.com/v1/accounts/list \ ๎ถ โ โโโ
-u "sk_test_51NgfRHG6b521LrzeeqGjN1eFyPpzjAxAi7GUPzDRvYH3DJbOgLrDOU5e3rTCjZyfGQA4G7Ye8OvV85rFwIHkfGax00jXBSarHO:"
-d email="bridzan@bridzan.com'"
{
"error": {
"message": "The provided key 'sk_test_***********************************************************************************************arHO' does not have access to account 'list' (or that account does not exist). Application access may have been revoked.",
"type": "invalid_request_error",
"code": "account_invalid",
"doc_url": "https://stripe.com/docs/error-codes/account-invalid"
}
}
Sure, the documentation provides curl examples: curl -G https://api.stripe.com/v1/accounts -u "sk_test_โฆ:"
but then how do i filter it by email?
curl -G https://api.stripe.com/v1/accounts \ ๎ถ โ โโโ
-u "sk_test_51NgfRHG6b521LrzeeqGjN1eFyPpzjAxAi7GUPzDRvYH3DJbOgLrDOU5e3rTCjZyfGQA4G7Ye8OvV85rFwIHkfGax00jXBSarHO:"
-d email="bridzan@bridzan.com'"
{
"error": {
"code": "parameter_unknown",
"doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
"message": "Received unknown parameter: email",
"param": "email",
"request_log_url": "https://dashboard.stripe.com/acct_1NgfRHG6b521Lrze/test/workbench/logs?object=req_6jBaS6UWDmfyox",
"type": "invalid_request_error"
}
}
this is what i get when trying to filter, which i had tried before as well..
going through each accounts and checking email (lets say i have 10000 users, i will have to go 100 times) and increasingly so, So the paginated user list isnt a solution for us
curl -G https://api.stripe.com/v1/customers/search \ ๎ถ โ โโโ
-u "sk_test_51NgfRHG6b521LrzeeqGjN1eFyPpzjAxAi7GUPzDRvYH3DJbOgLrDOU5e3rTCjZyfGQA4G7Ye8OvV85rFwIHkfGax00jXBSarHO:" \
-d query="email:'bridzan@bridzan.com'"
{
"object": "search_result",
"data": [
{
"id": "cus_U1jUDlHqJQvolx",
"object": "customer",
"address": null,
"balance": 0,
"created": 1771779671,
"currency": null,
"customer_account": null,
"default_source": null,
"delinquent": false,
"description": null,
"discount": null,
"email": "bridzan@bridzan.com",
"invoice_prefix": "S5Z8R9UW",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
"userId": "uPjiFuKXnhTRwCh1Nzz4BDSjDwn2"
},
"name": "brizan bhattarai",
"next_invoice_sequence": 1,
"phone": null,
"preferred_locales": [],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
],
"has_more": false,
"next_page": null,
"url": "/v1/customers/search"
}%
I think i found the solution for me
We do have an internal feature request to have a search API for accounts that could let you search directly by email, for example. I've added your use case to this as being interested
OK. Though I'd note that this is searching for Customers rather than Connected Accounts, as Glo mentioned earlier
yeah sorry..
it doesnt solve..
i want to search connected accounts just like this..
we do not have 10000 users as of now, but ride sharing drivers will have connect account to accumulate their money in wallet..
and we want to make sure no two drivers use same email to signup
Understood. The best solution we have at the moment is the List Connected Accounts API, if you have no way of storing emails in your own database
can you help me create a request with the parameters i provided? i am lil confused here..
You would list the connected accounts, and check the email parameter of each result
how do i filter? or do i have to filter in clientside?
isn't that a turn off? or its designed in that way? can i know the reason?
yeah but thats clientside from the perspective of stripe server.
the fact that we have to O(n) through the list of accounts to check email doesn't seem like a right solution to me..
Can i now the reason stripe doesn't provide that api for connected accounts but provides for customers?
I couldn't tell you why there hasn't been an API for this built so far, but it's a known feature request
I can only guess, but I imagine that many platforms manage and authenticate users by storing information in their own database
No idea, sorry
sure arran.. thanks for your time
You're welcome. We'll be here if you have any other questions!