Get started
Quickstart
From a test key to your first balance. With a test key you never touch a real account: you approve the link yourself as a made-up student, so no phone and no NEDApay app are needed.
Before you start
- Base address:
https://api.nedapay.xyz/v1 - Your keys: NEDApay gives you a key and a secret. You get a test pair first (made-up students, safe to build against) and a live pair later.
- Keep the secret on your server. Never put it in a mobile app, a web page or a repository. If it may have leaked, tell us and we replace it.
- Return addresses: tell us the exact address a user should come back to after approving, for example
https://yourapp.example/nedapay/linkedor your app's own scheme such asyourapp://nedapay-linked. Only registered addresses are accepted. - Server addresses (optional): if your servers have fixed IP addresses, give them to us and calls from anywhere else are refused.
Four calls
Every call is signed with your test key and secret. How to sign is on Sign requests.
Start a link. Make a PKCE pair first and keep the verifier on your server. The request waits 10 minutes.
POST /link-requests { "scopes": ["balances", "transactions", "stocks"], "redirect_uri": "<one of your registered return addresses>", "state": "<8 or more random characters you will check later>", "code_challenge": "<challenge>", "code_challenge_method": "S256" }{ "request_id": "...", "link_url": "https://app.nedapay.xyz/connect/link/...", "expires_at": "..." }Approve as a made-up student. This call replaces the user and their phone. It is refused with a live key.
POST /sandbox/approve { "request_id": "...", "student": "amina" }{ "code": "...", "state": "...", "redirect_url": "..." }Swap the code within 60 seconds. A code works once.
POST /token { "grant_type": "authorization_code", "code": "...", "code_verifier": "...", "redirect_uri": "..." }{ "access_token": "nca_…", "token_type": "Bearer", "expires_in": 900, "refresh_token": "ncr_…", "link_id": "...", "scopes": ["balances", "transactions", "stocks"], "consent_expires_at": "..." }Read. Send the signature headers plus
Authorization: Bearer <access_token>.GET /balances{ "balances": [ { "asset": "NTZS", "currency": "TZS", "amount": 184500 }, { "asset": "USDC", "currency": "USD", "amount": 12.4 } ], "as_of": "2026-11-18T09:41:00.000Z" }
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.Next
- Link a user: the full flow, including refresh and how long a link lasts.
- Read data: every read route and its answer.
- Sandbox: the three made-up students and what each one covers.