We are developing our own App to let our users place Shopify order, However, if an user has purchased an item through the buy button in our website, we can no longer use his email to register and get a token through the Storefront api in our own App, and we can no longer call the Storefront api to make a purchase in our App. How to deal with this issue?
Topic summary
Issue: An app using Shopify’s Storefront API cannot register a customer or obtain a customer token with an email if that customer previously purchased via the Buy Button on the website, blocking subsequent purchases through the app.
Clarification: A responder asked whether the problem occurs only for Buy Button customers or whenever a customer already has an order. They suggested considering the Admin GraphQL mutation draftOrderCreate as an alternative path. The original poster confirmed they want to create an order via the API when a customer already has an order.
Key terms:
- Storefront API: Customer-facing API for authentication and checkout.
- Buy Button: Embeddable sales channel enabling purchases on external sites.
- draftOrderCreate: Admin GraphQL mutation to create a draft order.
Current status: No solution provided yet. The thread is seeking guidance on how to handle customer authentication/token creation and order creation when the customer exists and has prior orders.
Open questions:
- Whether Buy Button orders affect Storefront customer authentication.
- Whether using Admin API (draftOrderCreate) is the recommended workaround.
Hi Mockingbird,
I’m not 100% sure I understand this issue - are you prevented from creating an order via the API (by using the draftOrderCreate mutation for example) when a customer already has an order in the store, or is it specifically if they use the buy button?
Hi Liam, thank you for the reply! Yes I want to create an order via the API when a customer already has an order in the store.