Reward Networks Reward Networks Developer Hub

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

  1. GET /customers/lookup?code=RN-000123 → note user_id.
  2. POST /transactions/preview with an amount → see points/stamps.
  3. POST /transactions/commit five times with different qr_scan_id values → the customer now has 5 stamps.
  4. GET /customers/{userId}/redeem-options → the stamp reward is redeemable: true.
  5. POST /customers/{userId}/redemptions with type: stamp → get a redemption_id. If redeem-options says approval_required: true, the answer is 202 awaiting: approve it as the customer with POST /customers/{userId}/redemptions/{redemptionId}/simulate-approval and {"decision": "approve"} (or decline).
  6. POST /transactions/redeem with that redemption_id → stamps spent.
  7. POST /transactions/{transactionId}/void on 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/validate accepts the same RN-000123 string a customer QR contains).
  • For the same reason the demo customer cannot approve a cashier redemption in the app: simulate-approval answers for it (sandbox keys only; a live key gets 403 SANDBOX_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.