How to Remove a Customer Account in Shopify–It’s Super Simple
Remove a Customer Account in Shopify
How many times have you ran across a customer account in your Shopify Store that you would just like to remove, but don’t know how? Let me show you how to accomplish this using this API.
The whole procedure is as follows.
Go to your Shopify store Admin. Down the left side, there is a tab titled apps. Click on “Apps”. On the right side of the screen toward the bottom find the “Manage private apps” Hyperlink. Click on that. It will open a “Private apps” screen in where you will see a “Create new private app” button.
Now click on that “Create new private app” button and create the new private APP and get API key and password.
The first part is to name it. I like to name it by what it does so it’s easy to remember. so I named mine “Customer Remover” and put my email address. You of course will use your email address.
Below the “API key” and “Password” fields, you need to find the “ADMIN API PERMISSIONS” heading. Make sure to provide “read and Write” permission for “Customers”. and save that App.
Now here is the important part. Copy that “Example URL” provided below that Password field. And append customer account delete API as follows.( In API_KEY YOUR-STORE and PASSWORD, replace with your private app’s credentials and store.)
Now using this API, make your AJAX call as follows to remove the customer account.
var target="https://API_KEY:PASSWORD@YOUR-STORE.myshopify.com/admin/api/2020-04/customers/{{customer.id}}.json" Shopify.postLink(target, { parameters: { _method: 'DELETE' } });
{{customer.id}} is mandatory. Because, the information you are deleting based on each user(Customer). So inputting customer ID is mandatory.
This call will delete your customer info.
Pretty easy, huh? There are a ton of other options that can be handled using that same API. If you need help or just would like a professional to handle it just