Almost all methods will require a merchant ID. The merchant ID is the unique identifier for a merchant's store.
With Appollo you no longer have to worry about writing a new installation serverinstallation server - A server that engages in oauth authentication flow when merchant tries to install your app. for each platform you decide to distribute your app to. When a merchant attempts to install your app. we securely handle OAuth authentication for you, then redirect the merchant to your sign-up URL.
Example Shopify app installation
When we redirect we will append some useful information as query parameters so that you can identify the user. You should parse these query parameters and save them. They will be useful in making requests to our API as well as handling Webhook calls [See Webhooks Quickstart].
Here's how you might parse the params:
const urlParams = new URLSearchParams(window.location.search); const email = urlParams.get('merchant_email') console.log(email); // [email protected] const name = urlParams.get('merchant_name') console.log(name); // John Doe const siteDomain = urlParams.get('merchant_shop') console.log(siteDomain); // empty woolworths.myshopify.com const storeId = urlParams.get('appollo_merchant_id') console.log(storeId); // storeId
Once a user installs your app, they are redirected to your sign-up page. You should make sure to prefill the sign-up form with the merchant's email (and name where applicable).
Make sure to save the merchantId to the user, so you can use it later.
Updated 6 months ago