> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "Generate Developer Shopify Installation Link"
description: "If you want Rye to associate a Shopify store with your developer account, you can use the following query to generate an installation link."
---

## Generate Installation Link

To generate an installation link, you can use the `shopifyInstallationLink` 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](/sync-api/shopify-merchant-onboarding/shopify-store-domains).

```graphql
query shopifyInstallationLink($storeCanonicalDomain: String!) {
  shopifyApp {
    installationLink(storeCanonicalDomain: $storeCanonicalDomain) {
      canonicalDomain
      url
    }
  }
}
```

Note that the returned `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 a [`SHOPIFY_APP_CONNECTED`](/webhooks/events#developer-related-webhooks) webhook if you have configured webhooks inside the Rye console. You can set up webhook delivery by following the instructions [here](/webhooks).

The `SHOPIFY_APP_CONNECTED` webhook looks like this:

```json
{
  "id": "hg9b8xyc-a128-4659-9c84-e3b376607977",
  "developerId": "xDasf23Jk4LKlxOq",
  "createdAt": "2023-06-27T12:00:09Z",
  "type": "SHOPIFY_APP_CONNECTED",
  "data": {
    "shopDomain": "rye.myshopify.com",
  }
}
```

The `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 the [`integratedShopifyStore`](/api-reference/integratedShopifyStore) 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.

```graphql
query GetIntegratedStoreDomain($canonicalDomain: String!) {
  integratedShopifyStore(canonicalDomain: $canonicalDomain) {
    canonicalDomain
  }
}
```

Here, `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

<Info>
  This feature is currently only available with authorization from us.
</Info>

By default Rye sets the commission rate for Shopify merchants to 25%. If you want to propose a different commission rate, you can use the [`proposeShopifyMerchantCommission`](/api-reference/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.

```graphql
mutation setCommissionRateForMerchant {
  proposeShopifyMerchantCommission(input: {
    canonicalDomain: "test.myshopify.com",
    ratePercent: 5
  }) {
    commissionProposal {
      createdAt
      ratePercent
    }
  }
}
```


---

*Powered by [holocron.so](https://holocron.so)*
