Skip to content

Testing in the sandbox

The sandbox is a separate environment, at https://sandbox-api.poweredbyaura.com/v1, where nothing is delivered or charged. It is free. Use a sandbox key, which starts aura_test_, and a campaign in test mode, whose status is testing. A campaign in testing takes actions only from test keys; a live key gets 422 campaign_not_live.

Each test number gives a set outcome, so you can test every path. Use them as the customer’s number in actions, offers and on the plan card.

Number What happens to the reward
+2348000000001 Delivered straight away.
+2348000000002 pending, then delivered about a minute later.
+2348000000003 Fails with number_not_eligible. The hold is released.
+2348000000004 Stays pending, then fails with network_timeout at its resolve_by, five minutes after it starts.
+2348000000005 Delivered, then reversed about five minutes later and refunded.
+2348000000007 A ported number: the network check finds its new network, and the reward is delivered there.
+2348000000008 Always flagged for review, so you can approve or reject it in the dashboard.

These are the same numbers, with the same delivery outcomes, as the Data Reselling sandbox.

Nobody should wait a week to see plan.cancelled. POST /sandbox/plans/{plan_id}/advance moves one test plan forward and runs what would happen then:

to What happens
at_risk_warning Moves to the warning time. If this week isn’t kept, Aura sends plan.at_risk.
period_end Ends this week. A week without its action cancels the plan and sends plan.cancelled. A kept week starts the next one, and sends plan.renewed at a month’s end, or plan.resized when a plan that grows reaches its bigger size.
Terminal window
curl https://sandbox-api.poweredbyaura.com/v1/sandbox/plans/pln_01JAC4XB7Q2W9D8M5X4N6B1C0V/advance \
-H "Authorization: Bearer $AURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": "at_risk_warning" }'

It works only in the sandbox, with a test key. The production server has no such endpoint. The dashboard’s test mode has the same buttons.

Before you go live, check your endpoint handles each event:

Event How to get it in the sandbox
plan.started Accept a test plan on the plan card.
reward.delivered Use +2348000000001.
reward.failed Use +2348000000003 or +2348000000004.
reward.flagged Use +2348000000008.
reward.rejected Report a second action in a week already kept, or reject a flagged reward.
plan.at_risk Move a plan that isn’t kept this week to at_risk_warning.
plan.cancelled Move a plan that isn’t kept this week to period_end.
plan.renewed Keep a plan and move it to period_end each week until a month ends.
plan.resized Switch on a plan that grows, then keep the plan until it reaches its bigger size.
campaign.paused Pause the test campaign in the dashboard.
balance.low Send a test event from the dashboard.

You can send a test event of any type from the dashboard, too. Test events carry "test": true.

A campaign can go live only after one test action has gone through and delivered. Then create a live key, which needs your business to be verified, and switch to https://api.poweredbyaura.com/v1. Going live needs a paid Aura plan. The steps are in Your first integration.