Shopify integration

Connect a Shopify store with two webhooks and one script tag.

Shopify sends paid and cancelled orders to Partli through webhooks, and partli.js records referral clicks on your storefront and tags the cart so the click survives checkout.

  1. ●

    Copy the webhook URL from Partli

    In Partli, open Settings → Billing integrations → Shopify.

  2. ●

    Create two webhooks in Shopify

    In Shopify admin go to Settings → Notifications → Webhooks and create two webhooks in JSON format pointing at the Partli URL: Order payment (sales) and Order cancellation (refund clawbacks).

  3. ●

    Paste the signing key into Partli

    At the bottom of the Shopify webhooks page, copy the key after "Your webhooks will be signed with" and save it as the secret in Partli.

  4. ●

    Add partli.js to your theme

    Online Store → Themes → ⋯ → Edit code → theme.liquid, paste this just before </head>, and save:

    <script defer src="https://partli.app/partli.js" data-partli></script>
  5. ●

    Test

    Open a partner's referral link in a private window and place an order (use Shopify's test payments on a development store). The sale appears in Partli within seconds.

Partner discount codes

Create a discount in Shopify with exactly the same code as the partner's Partli code. Orders that use it are credited to that partner even without a referral click.

Troubleshooting

Open the webhook in Shopify to see recent deliveries. A 401 means the signing key in Partli doesn't match. A 200 with no commission means the click wasn't carried through: check that partli.js is in the theme. Shopify's "Send test notification" only checks the connection; its sample order isn't credited to anyone.