Generate Installation Link
To generate an installation link, you can use theshopifyInstallationLink
query. The query will return a URL that you can send to your merchant. The query takes one variable, storeCanonicalDomain
.
storeCanonicalDomain
is the domain of the Shopify store you want to install the app on, for example, test-store.myshopify.com
. The domain provided here can be either the canonical domain or the storefront domain.
canonicalDomain
value should be used to identify the store for subsequent requests. In cases where you provided the storefront domain as the input, the returned canonicalDomain
value may differ.
Checking installation status
Webhook (recommended)
Once the merchant has finished installing the Rye app using your installation link, Rye will send out aSHOPIFY_APP_CONNECTED
webhook if you have configured webhooks inside the Rye console. You can set up webhook delivery by following the instructions here.
The SHOPIFY_APP_CONNECTED
webhook looks like this:
shopDomain
field in the webhook payload will contain the canonical domain of the associated Shopify store. This will match the canonicalDomain
value returned inside the installationLink
payload.
Polling
Once the installation link is generated, you can check the status of the installation by using theintegratedShopifyStore
query. The query takes one input argument, canonicalDomain
. The value used for the canonicalDomain
input should be the same as the canonicalDomain
returned inside the installationLink
payload.
canonicalDomain
will return null
until the store is integrated. Stores are considered to be “integrated” when the merchant has finished installing the Rye app.
Propose a commission rate
This feature is currently only available with authorization from us.
proposeShopifyMerchantCommission
mutation. The mutation takes an input with two fields, ratePercent
and canonicalDomain
. ratePercent
is the commission rate you want to propose. canonicalDomain
is the canonical domain of the Shopify store you want to propose the commission rate for.