Sandbox
Every approved developer gets a sandbox merchant: a fully working merchant that only your test keys can reach. Nothing you do there touches production data.
What is provisioned
| Item | Details |
|---|---|
| Merchant | "<Your name> Sandbox", status active, is_sandbox = true. |
| Branch | One branch, "Sandbox Branch". Its branch_id is what you pass to transactions/commit. |
| Loyalty campaign | Running. Awards points on every purchase. |
| Stamp campaign | Running. One stamp per purchase, reward after 5 stamps ("Sandbox Reward"). |
| Demo customer | "Sandbox Customer", already a member of the merchant. Has no phone; look it up by customer_code (RN-000123) or user_id. |
The IDs are shown on the Your sandbox card in the Developer Portal, or via the API:
curl "https://staging.app.rewards.network/api/partner/v1/branches" -H "Authorization: Bearer rn_test_..."
curl "https://staging.app.rewards.network/api/partner/v1/campaigns/status" -H "Authorization: Bearer rn_test_..."
Typical test script
GET /customers/lookup?code=RN-000123→ noteuser_id.POST /transactions/previewwith an amount → see points/stamps.POST /transactions/commitfive times with differentqr_scan_idvalues → the customer now has 5 stamps.GET /customers/{userId}/redeem-options→ the stamp reward isredeemable: true.POST /customers/{userId}/redemptionswithtype: stamp→ get aredemption_id. Ifredeem-optionssaysapproval_required: true, the answer is202awaiting: approve it as the customer withPOST /customers/{userId}/redemptions/{redemptionId}/simulate-approvaland{"decision": "approve"}(ordecline).POST /transactions/redeemwith thatredemption_id→ stamps spent.POST /transactions/{transactionId}/voidon one of the earns → points/stamps clawed back.
Register a webhook endpoint in the portal first and you will see each step arrive as an event. The portal's Test button sends a signed ping so you can verify signatures before wiring the real events.
Limits of the sandbox
- Customer QR codes come from the Reward Networks customer app. In the sandbox you usually will not have a phone logged in as the demo customer, so identify it by code (
qr/validateaccepts the sameRN-000123string a customer QR contains). - For the same reason the demo customer cannot approve a cashier redemption in the app:
simulate-approvalanswers for it (sandbox keys only; a live key gets403SANDBOX_ONLY). - Network rewards, package vouchers, Deal Hunt orders and birthday gifts (
rewards/claim,packages/redeem,item-deals/redeem,birthday-gift/redeem) need catalog entries a real merchant would create in the merchant app; the sandbox does not provision any. - Amounts, points and stamps are as real as production, but the data is yours alone.
Going live
Live keys work exactly the same way against a real merchant once its owner has approved your access request (portal → Merchant access, see Account & API keys). Keep the sandbox key for regression tests.
Reward Networks