Partner (Third Party App) Deep Link

Deep linking customers into the returns portal enables a frictionless returns experience. You only need two pieces of information to deep link: the Shopify order name and the shop's Shopify domain. Here's how to get started.

📘

If you are creating deep links for your own store and have access to your Loop admin, use the generate order link endpoint instead.

Become a Registered Third-Party App

Please submit the Loop Partner Registration form to become a registered third-party app in the Loop App Marketplace. Becoming a third-party app enables you to deep link customers into the returns portal. Once approved, Loop will provide a shared secret. Securely store this secret because you will use it to sign requests. Never allow this secret to be visible in the browser.

Redirect to Deep Link Endpoint

To deep link the customer into the returns portal you need to redirect the browser to our deep link API. When successful, the deep link API redirects to the returns portal.

Deep Link API

The deep link API can be reached at GET <https://api.loopreturns.com/api/v1/app/deep-link>

Required query parameters:

KeyDescription
orderShopify order name
partnerYour registered partner name
shop_domainThe Shopify domain where the order was placed e.g. example.myshopify.com
hmacHMAC value used to verify authenticity of request

Use the shared secret to generate the HMAC digest, as described below. The HMAC should be added to the request's query parameters. If the HMAC is verified and the other query parameters are valid then we will respond with a 307 Temporary Redirect that loads the returns portal for the order.

Generate the HMAC Digest for the Request

The HMAC used in the above API call should be generated using the following steps:

  1. Construct the query string with the keys sorted in alphabetical order. e.g. order=1000&partner=your-company&shop_domain=example.myshopify.com
  2. Using the query string, generate a (lowercase) hex encoded HMAC using SHA-256.

See this in code: