onari

Shopify

Count every paid Shopify order toward your campaigns, with no code and no app to install.

View as Markdown

Connect a Shopify store and every paid order becomes an order.paid event for the customer who placed it, with the order total as the amount. Campaigns can then reward order challenges, streaks and leaderboards straight away.

Connect

Create the connection in Onari

In the dashboard, go to Developers → Website & stores → Shopify and click Connect Shopify. Use Sandbox first with a development store, then do the same in Live. Onari adds order.paid ("pays for an order") to your events list.

Add the webhook in Shopify

In Shopify admin, open Settings → Notifications → Webhooks and click Create webhook:

  • Event: Order payment
  • Format: JSON
  • URL: the webhook URL from Onari (https://api.onari.xyz/v1/connect/shopify/…)

Paste Shopify's signing key into Onari

Under the webhooks list, Shopify shows "Your webhooks will be signed with …". Copy that key into Shopify signing key in Onari and save. Onari refuses any order it can't verify with this key.

Send a test

Click Send test notification next to the webhook in Shopify. Within seconds the Shopify card in Onari shows it. In live, Shopify's sample order isn't counted; in sandbox it is, so you can try a campaign.

What's counted

ShopifyOnari event
customer.idplayer_id
current_total_price (or total_price)amount, in minor units for the order's currency
currencyproperties.currency
idproperties.order_id; also the idempotency key, so each order counts once however often Shopify retries
  • Guest checkouts aren't counted: there's no customer to reward. Shopify lets you require or encourage customer accounts in Settings → Customer accounts.
  • Test orders (Shopify's Bogus gateway) count in sandbox only.
  • Refunds don't undo rewards already won.
  • Plan limits apply as for API events. If a delivery can't be counted (for example your Free plan's monthly players are used up), Onari replies 200 so Shopify doesn't keep retrying, and the Shopify card shows why.

Show rewards on your store

Add the website embed to your theme so customers can see their progress and rewards. It uses the same customer.id, so orders and the Hub line up.

Disconnect

⋯ → Disconnect on the Shopify card stops orders from counting. Delete the webhook in Shopify too.

On this page