Get started in 5 steps
From a new account to your first successful API call, in a few minutes.
- 1
Create an account
Sign in with your email — SamaPrime uses one-time email codes, no password to manage.
- 2
Generate an API key
Open your developer dashboard and create a test key. You'll see the full key exactly once — copy it somewhere safe.
- 3
Make your first request
Call GET /v1/wallet with your new key to read the test account's wallet balance.
curl -X GET "https://samaprime.com/api/v1/wallet" \-H "Authorization: Bearer sk_test_..." \-H "Content-Type: application/json" - 4
Handle errors
Every error is structured JSON with a stable type/code — branch on those, never on the human-readable message.
const res = await fetch(url, { headers });const body = await res.json();if (!res.ok) {// Branch on body.error.type / body.error.code — never on// body.error.message, which may change wording over time.if (body.error.type === "insufficient_balance") {// top up and retry} else if (body.error.type === "rate_limited") {// back off and retry after Retry-After}throw new Error(body.error.code);}console.log(body.data); - 5
Set up webhooks
Register a URL so your integration hears about order and deposit events the moment they happen, instead of polling.