Search customers

GET {{baseUrl}}/v1/customers/search?query=<string>

Search for customers you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

Request Params

KeyDatatypeRequiredDescription
expand[0]stringSpecifies which fields in the response should be expanded.
expand[1]stringSpecifies which fields in the response should be expanded.
limitstringA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
pagestringA cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
querystring(Required) The search query string. See search query language and the list of supported query fields for customers.

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;object&quot;:&quot;search_result&quot;,&quot;url&quot;:&quot;/v1/customers/search&quot;,&quot;has_more&quot;:false,&quot;data&quot;:[{&quot;id&quot;:&quot;cus_NeGfPRiPKxeBi1&quot;,&quot;object&quot;:&quot;customer&quot;,&quot;address&quot;:null,&quot;balance&quot;:0,&quot;created&quot;:1680569616,&quot;currency&quot;:null,&quot;default_source&quot;:null,&quot;delinquent&quot;:false,&quot;description&quot;:null,&quot;discount&quot;:null,&quot;email&quot;:null,&quot;invoice_prefix&quot;:&quot;47D37F8F&quot;,&quot;invoice_settings&quot;:{&quot;custom_fields&quot;:null,&quot;default_payment_method&quot;:&quot;pm_1Msy7wLkdIwHu7ixsxmFvcz7&quot;,&quot;footer&quot;:null,&quot;rendering_options&quot;:null},&quot;livemode&quot;:false,&quot;metadata&quot;:{&quot;foo&quot;:&quot;bar&quot;},&quot;name&quot;:&quot;Jane Doe&quot;,&quot;next_invoice_sequence&quot;:1,&quot;phone&quot;:null,&quot;preferred_locales&quot;:[],&quot;shipping&quot;:null,&quot;tax_exempt&quot;:&quot;none&quot;,&quot;test_clock&quot;:null}]}