> ## Documentation Index
> Fetch the complete documentation index at: https://docs-test.rye.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create merchant connector installation link

> Generate an installation link for a merchant connector (e.g. Shopify).

The returned URL begins the connector's OAuth handshake. Direct the
merchant to it; once they authorize the Rye app, the connector redirects
back to Rye to complete the install. The merchant is attributed to the
calling developer and becomes available for checkout via this account.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/checkout-intents/openapi.documented.yml get /api/v1/merchant-connectors/{connector}/installation-link
openapi: 3.0.0
info:
  title: Universal Checkout API
  version: 1.0.5
  description: >-
    Turn any product URL into a completed checkout. Instantly retrieve price,
    tax, and shipping for any product, and let users buy without ever leaving
    your native AI experience.


    View the [Rye API docs](https://docs.rye.com).
  termsOfService: https://rye.com/terms-of-service
  license:
    name: UNLICENSED
  contact:
    name: Rye
    email: dev@rye.com
    url: https://docs.rye.com
servers:
  - url: https://staging.api.rye.com
security: []
paths:
  /api/v1/merchant-connectors/{connector}/installation-link:
    get:
      tags:
        - Merchant Connectors
      summary: Create merchant connector installation link
      description: |-
        Generate an installation link for a merchant connector (e.g. Shopify).

        The returned URL begins the connector's OAuth handshake. Direct the
        merchant to it; once they authorize the Rye app, the connector redirects
        back to Rye to complete the install. The merchant is attributed to the
        calling developer and becomes available for checkout via this account.
      operationId: CreateInstallationLink
      parameters:
        - description: The merchant connector to generate an installation link for
          in: path
          name: connector
          required: true
          schema:
            $ref: '#/components/schemas/MerchantConnector'
        - description: >-
            Domain or URL of the merchant store to generate the installation
            link for
          in: query
          name: storeUrl
          required: true
          schema:
            type: string
        - description: >-
            If true, the merchant onboarded via this link is exclusive to the
            calling developer
          in: query
          name: private
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: OAuth authorization URL for the requested connector
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantConnectorInstallationLink'
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeError'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotImplementedError'
      security:
        - bearerAuth:
            - checkout_intents:write
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import CheckoutIntents from 'checkout-intents';


            const client = new CheckoutIntents({
              apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
            });


            const installationLink = await
            client.merchantConnectors.createInstallationLink('shopify', {
              storeUrl: 'storeUrl',
            });


            console.log(installationLink.connector);
        - lang: Python
          source: >-
            import os

            from checkout_intents import CheckoutIntents


            client = CheckoutIntents(
                api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"),  # This is the default and can be omitted
            )

            installation_link =
            client.merchant_connectors.create_installation_link(
                connector="shopify",
                store_url="storeUrl",
            )

            print(installation_link.connector)
        - lang: Java
          source: >-
            package com.rye.example;


            import com.rye.client.CheckoutIntentsClient;

            import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;

            import com.rye.models.merchantconnectors.InstallationLink;

            import
            com.rye.models.merchantconnectors.MerchantConnectorCreateInstallationLinkParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();

                    MerchantConnectorCreateInstallationLinkParams params = MerchantConnectorCreateInstallationLinkParams.builder()
                        .connector(MerchantConnectorCreateInstallationLinkParams.Connector.SHOPIFY)
                        .storeUrl("storeUrl")
                        .build();
                    InstallationLink installationLink = client.merchantConnectors().createInstallationLink(params);
                }
            }
        - lang: cURL
          source: >-
            curl
            https://staging.api.rye.com/api/v1/merchant-connectors/$CONNECTOR/installation-link
            \
                -H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"
components:
  schemas:
    MerchantConnector:
      type: string
      enum:
        - shopify
      nullable: false
      description: |-
        A merchant connector is a Rye integration with a third-party merchant
        platform (e.g. Shopify) that lets developers onboard merchants to Rye.
        Today only Shopify is supported; this union expands as we add support
        for additional connectors (Woocommerce, BigCommerce, etc.).
    MerchantConnectorInstallationLink:
      $ref: '#/components/schemas/ShopifyInstallationLink'
      description: A merchant connector installation link.
    AuthenticationError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    ValidateError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
        status:
          type: number
          format: double
        fields:
          $ref: '#/components/schemas/FieldErrors'
      required:
        - name
        - message
        - status
        - fields
      type: object
      additionalProperties: false
    RuntimeError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    NotImplementedError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    ShopifyInstallationLink:
      properties:
        url:
          type: string
          description: |-
            URL to redirect the merchant to in order to install the Rye app on
            their merchant platform.
        connector:
          type: string
          enum:
            - shopify
          nullable: false
          description: The merchant connector this installation link was generated for.
      required:
        - url
        - connector
      type: object
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
          - message
        type: object
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Rye API key

````