Sandbox and live
Every app has two modes with separate keys. The key you use decides the mode; nothing else changes in your code.
| Sandbox | Live | |
|---|---|---|
| Keys | yp_test_pk_…, yp_test_sk_… | yp_live_pk_…, yp_live_sk_… |
| Surveys | Practice surveys that end the way you choose | Real surveys, matched to each user |
| Earnings | None. Nothing reaches your balance | Added to your balance and invoiced monthly |
| Postbacks | Sent to the same URL with test=1, signed with the sandbox secret key | Sent with test=0, signed with the live secret key |
| API | Returns sandbox data only | Returns live data only |
| Dashboard | The Live / Sandbox switch at the top chooses which data and which keys you see | |
A full test run
- Put your sandbox public key into your integration and open the wall as any user id.
- Open a practice survey. Instead of questions you get the endings a real survey can have.
- Choose Complete the survey. Your server receives a postback with
status=completedandtest=1. - On the result page choose Now reverse it. Your server receives
status=reversedwith the sametransaction_idand the reward negated. - Open another practice survey and choose Screen out to see
status=screenout. - Check the conversions and the postback log in your dashboard, with the switch on Sandbox.
Going live checklist
- Your integration uses the live public key.
- Your postback handler verifies signatures with the live secret key and ignores nothing but duplicates.
- It handles
reversedby deducting the reward. - It does not credit real users when
test=1. - "Require signed wall links" is on, and your server signs user ids.
Secret keys can be replaced at any time from the app page. The old key stops working at once, so update your server in the same step.