tutorials

How to Add Resonance to Your Existing Smile.io Program (Tutorial)

February 9, 2026 10 min read By Resonance Team

Step-by-step guide to adding network rewards to your Shopify store's Smile.io loyalty program.

This tutorial shows you how to add Resonance network rewards alongside your existing Smile.io program. Your customers will earn both Smile points (closed-loop) and RSNC (open-loop).

Prerequisites

  • Shopify store with Smile.io installed
  • Resonance account (sign up at partners.rsnc.network)
  • Basic familiarity with Shopify theme code or app development

Architecture Overview

Here's how the integration works:

1
Customer makes a purchase on your Shopify store
2
Smile.io awards points (existing behavior, unchanged)
3
Your webhook captures the event
4
Webhook triggers RSNC earning via Resonance API
Customer now has both Smile points and RSNC

Step 1: Get Your Resonance Credentials

  1. Log in to the Resonance Partner Portal
  2. Navigate to Settings > API Keys
  3. Copy your Brand ID and API Key

Step 2: Set Up the Webhook Endpoint

You need a server endpoint to receive Smile.io events and forward them to Resonance. Here's a Node.js example:

webhook-handler.js
const express = require('express');
const app = express();

app.use(express.json());

// Environment variables
const RESONANCE_BRAND_ID = process.env.RESONANCE_BRAND_ID;
const RESONANCE_API_KEY = process.env.RESONANCE_API_KEY;

// Webhook endpoint for Smile.io events
app.post('/webhooks/smile', async (req, res) => {
  const { topic, customer, points } = req.body;

  // Only process points earned events
  if (topic !== 'points/earned') {
    return res.status(200).send('OK');
  }

  try {
    // Forward to Resonance
    const response = await fetch(
      'https://api.rsnc.network/resonance-api/manual-event',
      {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${RESONANCE_API_KEY}`
        },
        body: JSON.stringify({
          brandId: RESONANCE_BRAND_ID,
          eventType: 'purchase',
          userEmail: customer.email,
          metadata: {
            smile_points: points.amount,
            source: 'smile_webhook'
          }
        })
      }
    );

    if (!response.ok) {
      console.error('Resonance API error:', await response.text());
    }

    res.status(200).send('OK');
  } catch (error) {
    console.error('Webhook error:', error);
    res.status(500).send('Error');
  }
});

app.listen(3000, () => {
  console.log('Webhook server running on port 3000');
});

Step 3: Configure Smile.io Webhooks

  1. In your Shopify admin, go to Apps > Smile.io
  2. Navigate to Integrations > Webhooks
  3. Add a new webhook with your endpoint URL
  4. Select the "Points Earned" event
  5. Save the webhook

Step 4: Fund Your RSNC Pool

  1. In the Resonance Partner Portal, go to Funding
  2. Add funds ($1 minimum to test)
  3. Set your earning rate (e.g., 10 RSNC per $1 spent)

Step 5: Test the Integration

  1. Make a test purchase on your store
  2. Verify Smile.io awards points
  3. Check your webhook logs for the forwarded event
  4. Verify RSNC appears in the customer's Resonance balance

Step 6: Add RSNC Balance Display (Optional)

Show customers their RSNC balance alongside Smile points:

balance-display.js
// In your Shopify theme or app
async function getRSNCBalance(email) {
  const response = await fetch(
    `https://docs.rsnc.network/guides/custom-events?email=${encodeURIComponent(email)}`,
    {
      headers: {
        'Authorization': `Bearer ${RESONANCE_API_KEY}`
      }
    }
  );

  const data = await response.json();
  return data.balance;
}

// Display in your loyalty widget
const rsncBalance = await getRSNCBalance(customerEmail);
document.getElementById('rsnc-balance').textContent =
  `${rsncBalance.toLocaleString()} RSNC (spendable across the network)`;
Result: Your customers now earn Smile points (redeemable with you) AND RSNC (redeemable across the network). Same purchase, two reward systems.

Troubleshooting

Webhook not firing?

  • Check Smile.io webhook config
  • Verify endpoint is publicly accessible
  • Check server logs for errors

RSNC not appearing?

  • Verify API key is correct
  • Check RSNC pool is funded
  • Confirm customer email matches

Two reward systems. One purchase event.

Customers get the best of both worlds.

Closed-loop for your brand. Open-loop for the network.

See Also

Tags
tutorial Smile.io integration code