For the complete documentation index, see llms.txt. This page is also available as Markdown.

Adding a new app

Good to know: While you manage multiple affiliate programs from the same dashboard, you set up each one separately. That lets you set different affiliate terms, such as commission rate, for each app.

The new app form

Go to the My Apps page and click Add a new app. You will be redirected to the new app page.

App settings

Set your app's settings based on your preferences. You can change them later from your dashboard.

Affiliate terms

These are the contract details between an app and an affiliate. You can find a detailed explanation in The affiliate terms.

App details

  • App name: The exact name shown in the App Store.

  • App logo:

    Upload your logo as a .png file. We recommend 125x125.

  • Shopify App Store listing link:

    Must be your App Store listing, starting with https://apps.shopify.com/. Example: https://apps.shopify.com/YourApp

  • App support email:

    Your affiliates will use this email if they want to contact you.

  • App category:

    Your app category, as listed in the Shopify App Store. If you can't find the right one, choose Other.

Authentication

  • Partner ID:

    Find it under SettingsAccount information.

  • Partners API client access token:

Important! Shoffi requires API permissions for your app so we can detect installs from referral links and calculate earnings and commission rates correctly.

These permissions give us read-only access. We use it only to read the information relevant to the Shoffi platform.

We don't read any data from before your Shoffi integration. You can find more information about the Partner API permissions here.

When creating a new API client, please approve permissions to:

  • View financials

  • Manage apps

If it's your first time creating a Partner API key, follow Shopify's guide.

App ID:

  • Go to your app page on the partner admin and copy it from the URL.

    For example:

    https://partners.shopify.com/1111111/apps/1234567#/

    1234567 is your app ID.

App resources (optional)

Add links to a public Google Drive, YouTube channel, or any other platform where your affiliate partners can find resources and tutorials to help them learn and promote the app.

The app integration process

Partners API connection

To submit the new app form, you must validate the connection to your Shopify Partners API. This confirms that the details you entered are correct. If a field is wrong or permissions are missing, you will get an error that explains what went wrong.

Option 1: BigQuery integration

See BigQuery integration for a detailed guide.

When you connect BigQuery in Shoffi, use the numeric GA4 Property ID (digits only from GA4 Admin → Property details) — not the Measurement ID that starts with G-, and not a Shopify Partners app ID. The Project ID and Property ID must be a matched pair: the property’s BigQuery export must live in the same Google Cloud project you enter in Shoffi.

If something is slightly off (for example the Property ID), Shoffi’s automatic checks can often detect the correct property from your project and fix it — or show a banner on your Apps page with the exact step to fix.

Option 2: POST request

When you have those values, you need to send the POST request with the following data:

api_key, shopName, appId, XFF

Variable explanations

  • "api_key": Your Shoffi post-install key is generated when you add a new app. You can find it by clicking Edit app on the My Apps page. This is not the Shoffi API Key used for the Shoffi API — that key is created under Integrations → API Key.

  • "shopName": The full shop domain currently logged in to the app, for example newshop.myshopify.com.

  • "appId": The ID of your Shopify app. To find it, go to your app page in the Partner Dashboard and copy it from the URL. For example, in https://partners.shopify.com/1111111/apps/1234567#/, 1234567 is your app ID. A Shopify appId is digits only - don't send the Shoffi app id here. If it contains any letters, Shoffi will reject the request with a "wrong appId" error.

  • "XFF": 'X-Forwarded-For' header value

Here is what the POST request looks like:

Different languages

The code above shows a Shoffi POST request. You can use any other language, including Ruby or PHP, to send it.

If you are having trouble finding the value of the 'X-Forwarded-For' header, try searching for it under the request headers. Here are a few examples in different languages:

  • node: ctx.request.header['x-forwarded-for']

  • ruby: request.env["HTTP_X_FORWARDED_FOR"]

  • PHP: $_SERVER["HTTP_X_FORWARDED_FOR"]

Testing the request

You can use your app's test key to send the POST request from a test app or staging environment. The call still returns HTTP 200, so you can confirm your code is reaching Shoffi. Always read the JSON body — a 200 does not mean the request is ready for production.

Example — production key and a valid XFF:

Example — you used the test key. Installs sent with the test key are not tracked. Change to your production key before you go live:

You'll also get a warning (still HTTP 200) if the XFF value is wrong — for example missing, a placeholder like 0.0.0.0 or 11.1111.111.111, the text unknown, or an IP sent together with a port. Use the merchant's real x-forwarded-for value (IPv4 or IPv6), without a port.

Once you push your code to production, change the test key to the real one.

If a problem with your post-install call continues after your app is approved, Shoffi will also show an error on your My Apps page describing what to fix. Important: while the post-install call is sending a wrong IP, Shoffi can't match new referrals, so affiliate installs during that time won't be attributed - so it's worth fixing quickly.

Initiating the request

Once the POST request is added, you need to open a new development store from your Partner Dashboard and install and open your app. Once our system receives the request for the first time, the integration status will change to Completed, and your app will be ready for affiliates to use.

Integration status

You can find the status of your app integration on the My Apps page. There are three different integration statuses:

  1. Incomplete

    The Partner API connection was successful. We are waiting for the POST request.

  2. Under review POST request detected. We are now reviewing your app. This can take up to 48 hours. If it has been more than 48 hours and your app is still under review, check the email address you used to sign up for Shoffi. We may have sent instructions about what needs to be fixed.

  3. Completed

    Your app was approved and is now listed on Shoffi.

Last updated