Quickstart
Make your first successful call in about five minutes: award points to the demo customer of your sandbox merchant.
1. Get a test key
- Register a developer account. New accounts are pending until the Reward Networks team activates them; until then signing in shows a "pending approval" notice.
- Sign in to the Developer Portal. Your sandbox merchant is already there, with a running loyalty campaign, a stamp campaign, one branch and a demo customer.
- Under Create key, pick the sandbox merchant, give the key a name and click Create key. Copy the
rn_test_…value — it is shown once.
The portal's Your sandbox card lists the branch_id and the demo customer's user_id and customer_code you need below.
2. Look up the demo customer
curl "https://staging.app.rewards.network/api/partner/v1/customers/lookup?code=RN-000123" \
-H "Authorization: Bearer rn_test_..." \
-H "Accept: application/json"
{
"success": true,
"message": "Customer retrieved successfully",
"data": {
"user_id": 123,
"full_name": "Sandbox Customer",
"email": "sandbox-customer+x1y2z3@partner.invalid",
"phone": null,
"is_member": true,
"points_balance": 0,
"stamps_balance": 0
}
}
In production you get the same object by scanning the customer's QR (POST /qr/validate) or by phone/email — see Customers & members.
3. Preview what a purchase earns
curl -X POST "https://staging.app.rewards.network/api/partner/v1/transactions/preview" \
-H "Authorization: Bearer rn_test_..." \
-H "Content-Type: application/json" \
-d '{ "amount": 25.00 }'
The response tells you whether loyalty/stamp campaigns are running and how many points and stamps the amount would earn (data.points_earned, data.stamps_earned). Show it on the till before the customer pays.
4. Award the points
curl -X POST "https://staging.app.rewards.network/api/partner/v1/transactions/commit" \
-H "Authorization: Bearer rn_test_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7f6a2c1e-9d4b-4c3a-8e5f-0a1b2c3d4e5f" \
-d '{
"user_id": 123,
"branch_id": 45,
"amount": 25.00,
"qr_scan_id": "POS-0001-20260922-0042"
}'
{
"success": true,
"message": "Transaction committed successfully",
"data": {
"transaction": { "id": 9901, "final_amount": "25.00", "points_delta": 25, "stamps_delta": 1, "...": "..." },
"points_earned": 25,
"stamps_earned": 1,
"loyalty_enabled": true,
"stamp_enabled": true
},
"is_duplicate": false
}
Send the exact same request again: the stored response comes back with header Idempotency-Replayed: true. Send it with a new Idempotency-Key but the same qr_scan_id: you get "is_duplicate": true. Either way nothing is awarded twice — keep sending both from your POS.
5. Check the balance
curl "https://staging.app.rewards.network/api/partner/v1/customers/123/balance" -H "Authorization: Bearer rn_test_..."
data.points_balance is now 25.
Next steps
- Award points & stamps — the full earn flow, including vouchers applied to a sale.
- Redeem a customer QR — spend points, stamps and vouchers.
- Webhooks — get told when something happens instead of polling.
- Ready for production? Account & API keys explains live keys.
Reward Networks