Environments
Sandbox
The sandbox is for building and testing against made-up students. No real account is ever read, and no phone or NEDApay app is needed: your own server approves the link, standing in for the user.
Step by step Sandbox · test key
Everything happens between your server and ours. Four calls, all signed with the test key and secret.
| Your server | Call | Answer | NEDApay Connect |
|---|---|---|---|
| 1. Start a link | POST /link-requests | request_id, link_url | Creates a request that waits 10 minutes |
| 2. Approve as a made-up student | POST /sandbox/approve | one-time code | Refused with a live key |
| 3. Swap the code | POST /token | access token + refresh token | Code works once, for 60 seconds |
| 4. Read | GET /balances, /transactions, /stocks/holdings | the made-up student's data | Answers from fixed sample data |
Approve a request
Instead of sending a user to link_url, approve the request yourself as a made-up student, then continue from swapping the code.
POST
/sandbox/approve{ "request_id": "...", "student": "amina" }{ "code": "...", "state": "...", "redirect_url": "..." }The three students
Chosen to cover the cases your screens must handle: a busy account, a small one and an empty one.
Aamina
An active account, with a failed payment and a swap
nTZSTZS 184,500
USDC12.40
Transactions6
StocksCRDB 120, NMB 15
Jjuma
A light account
nTZSTZS 9,250
USDC0
Transactions2
Stocksnone
Nneema
Just signed up
nTZSTZS 0
USDC0
Transactionsnone
Stocksnone
The amounts never change. Transaction dates are counted back from the moment of the call, so the data always looks recent.
What is different, and what is the same
| Sandbox | Live | |
|---|---|---|
| Key | Starts with nc_test_ | Starts with nc_live_ |
| Whose data | Three made-up students | Real users who approved the link |
| Who approves | Your server, with POST /sandbox/approve | The user, inside NEDApay, with fingerprint or face |
| NEDApay app needed | No | Yes, or the NEDApay web app |
| Verification | Not applicable | Full identity verification required to link |
| Data | Fixed sample values | Current balances and history, read at the moment of the call |
| Ending a link | You call DELETE /link | You, or the user in Settings, under Linked apps |
| Paused accounts | Never | A frozen account answers LINK_PAUSED until it is released |
| Risk to money | None | None. Connect is read-only in both modes. |
| Same in both | Request signing, one-use nonces, PKCE, the 60-second one-time code, 15-minute access tokens, single-use refresh tokens, scopes, response shapes, error codes and rate limits. A test key can never read a live link, and a live key can never use the sandbox. | |
Moving to live needs no code change beyond using the live key and sending users to
link_url in place of calling the sandbox approval. See Going live.