Connecting Your Existing Points System to Resonance via Webhooks
Generic developer tutorial: connect any existing program to Resonance events. Code examples for common platforms.
Connecting Your Existing Points System to Resonance via Webhooks
One API endpoint. Any backend. Your existing program stays exactly as it is.
You already have a loyalty program. Maybe it’s Smile.io points. Maybe it’s a custom-built system. Maybe it’s a spreadsheet you update manually every Friday. Whatever it is, it works for you — but it’s closed-loop. Your rewards live and die inside your own ecosystem.
This guide shows you how to connect any existing points system to Resonance via webhooks, so your users can earn RSNC credits alongside — or instead of — whatever you’re already running. No rip-and-replace. No migration. Just a bridge.
Why Webhooks?
A webhook is a real-time notification. When something happens in your system (a purchase, a signup, a review), your system sends an HTTP POST to Resonance. Resonance processes it and distributes RSNC. The whole round-trip takes under 200ms.
You don’t need to swap out your existing stack. You don’t need to touch your frontend. You just need your backend to make one API call when something interesting happens.
Stays the same: Your existing loyalty logic, your UI, your point calculations, your customer experience.
Changes: You add one HTTP POST call per event. Users start earning RSNC in parallel. They now have portable, cross-brand rewards on top of your existing program.
The Integration Pattern
Every integration follows the same three-step flow, regardless of what system you’re connecting from.
- Configure your events in the Resonance Partner Portal. Define which actions earn RSNC and how much. Purchase, signup, review, referral — whatever your program rewards.
- Add a webhook call to your existing backend. When the event fires in your system, POST to the Resonance Event Handler API with the event type, user email, and any metadata.
- Test and verify. Fire a test event, confirm it appears in your Partner Portal analytics, confirm the user received RSNC. Done.
The API Call
This is the core of every integration. One endpoint handles everything:
POST https://api.rsnc.network/resonance-api/manual-event
Content-Type: application/json
{
"event": "place_order",
"email": "[email protected]",
"metadata": {
"platform": "your-platform",
"order_id": "ORD-12345",
"total": 89.99,
"items": 3
}
}
That’s it. One POST. The Event Handler validates the request, checks your configured reward rules, and distributes RSNC to the user’s wallet automatically. If the user doesn’t have a wallet yet, one is created for them behind the scenes via OAuth pregeneration.
Connecting Shopify
Shopify sends order webhooks natively. You just need a small handler that receives them and forwards to Resonance.
const crypto = require('crypto');
const express = require('express');
const app = express();
app.post('/webhooks/order-created', async (req, res) => {
// Verify Shopify signature
const hmac = req.headers['x-shopify-hmac-sha256'];
const hash = crypto
.createHmac('sha256', process.env.SHOPIFY_SECRET)
.update(req.rawBody, 'utf8')
.digest('base64');
if (hmac !== hash) return res.status(401).send('Unauthorized');
const order = req.body;
// Forward to Resonance
await fetch('https://api.rsnc.network/resonance-api/manual-event', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
event: 'place_order',
email: order.customer.email,
metadata: {
platform: 'shopify',
order_id: order.id,
total: order.total_price
}
})
});
res.json({ success: true });
});
Connecting WordPress
WordPress has action hooks for everything. Here’s a plugin-style integration that rewards users for posting reviews:
add_action('comment_post', function($comment_ID, $approved) {
if ($approved !== 1) return;
$comment = get_comment($comment_ID);
wp_remote_post(
'https://api.rsnc.network/resonance-api/manual-event',
[
'body' => json_encode([
'event' => 'post_review',
'email' => $comment->comment_author_email,
'metadata' => [
'platform' => 'wordpress',
'post_id' => $comment->comment_post_ID,
'comment_id' => $comment_ID
]
]),
'headers' => ['Content-Type' => 'application/json']
]
);
}, 10, 2);
Connecting a Custom Backend
If you have a custom system — Node, Python, Go, whatever — the pattern is identical. Find the moment in your code where the user action happens, and add the POST call.
import requests
def reward_user(event_type, user_email, metadata=None):
requests.post(
'https://api.rsnc.network/resonance-api/manual-event',
json={
'event': event_type,
'email': user_email,
'metadata': metadata or {}
}
)
# In your existing code:
def handle_purchase(order):
process_payment(order) # your existing logic
update_inventory(order) # your existing logic
send_confirmation(order) # your existing logic
reward_user( # one new line
'place_order',
order.customer_email,
{'order_id': order.id, 'total': order.total}
)
User Identification
Resonance identifies users by email. If your system uses platform-specific IDs (Discord user IDs, Telegram IDs, Twitter handles), use the deterministic email format:
| Platform | Email Format | Example |
|---|---|---|
| Email (native) | Customer’s actual email | [email protected] |
| Discord | discord_{user_id}@rsnc.network | [email protected] |
| Telegram | telegram_{user_id}@rsnc.network | [email protected] |
| Twitter/X | twitter_{user_id}@rsnc.network | [email protected] |
| Shopify | Customer’s actual email | [email protected] |
Same user ID always maps to the same wallet. A user who earns RSNC via Discord and later logs in with Twitter gets all their rewards in one place.
What About Security?
The Event Handler validates every request against your configured domain and brand ID. It deduplicates events automatically (same user + same event + same cooldown window = no double reward). Rate limiting is built in. HTTPS only.
You don’t need API keys for the basic SDK integration. For server-side webhooks, your brand ID and configured domain act as the authentication layer. The system is designed so that even if someone spoofs a request, the worst case is a user gets a small RSNC reward — not a security breach.
Testing
Hit the debug endpoint to verify your connection:
curl https://api.rsnc.network/resonance-api/debug
Then fire a test event and check your Partner Portal. The event should appear in analytics within seconds. The user’s wallet balance updates in real time.
Your existing loyalty program stays exactly as it is. Resonance runs alongside it — adding portable, cross-brand value without touching what already works.
What Happens Next
Once connected, your users earn RSNC for the same actions your existing program already rewards. The difference: RSNC is portable. Users can redeem across any community or brand in the Resonance network. Your program just became part of something bigger — without changing a single line of your existing loyalty logic.
Setup time: 15 minutes if you have backend access. One API endpoint. One POST call. That’s the whole integration.