Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
Parameters
No parameters.
Returns
Returns an object with a deleted parameter on success. If the customer ID does not exist, this call throws an error.
Unlike other objects, deleted customers can still be retrieved through the API in order to be able to track their history. Deleting customers removes all credit card details and prevents any further operations to be performed (such as adding a new subscription).
{ "id": "cus_NffrFeUfNV2Hib", "object": "customer", "deleted": true}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.
Parameters
- querystringRequired
The search query string. See search query language and the list of supported query fields for customers.
- limitinteger
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
- pagestring
A 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.
Returns
A dictionary with a data property that contains an array of up to limit customers. If no objects match the query, the resulting array will be empty. See the related guide on expanding properties in lists.
{ "object": "search_result", "url": "/v1/customers/search", "has_more": false, "data": [ { "id": "cus_NeGfPRiPKxeBi1", "object": "customer", "address": null, "balance": 0, "created": 1680569616, "currency": null, "default_source": null, "delinquent": false, "description": null, "email": null, "invoice_prefix": "47D37F8F", "invoice_settings": { "custom_fields": null, "default_payment_method": "pm_1Msy7wLkdIwHu7ixsxmFvcz7", "footer": null, "rendering_options": null }, "livemode": false, "metadata": { "foo": "bar" }, "name": "Jane Doe", "next_invoice_sequence": 1, "phone": null, "preferred_locales": [], "shipping": null, "tax_exempt": "none", "test_clock": null } ]}- Need help? Contact Support.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.
- Powered by Markdoc