Sign In Get Started →

ScayPay API Reference

The ScayPay API provides three core capabilities for moving money: collect it from customers (Payment), send it out to recipients (Disbursement), and move it from one party to another in one atomic operation (Transfer).

Base URL
https://api.scaypay.com/v1
Currency
TZS only
Min Payment
TZS 200 mobile · TZS 500 card
Max / Transaction
TZS 10,000,000

Core Concepts

Payment
Collect money from customers via mobile money, card, or QR. Funds flow into your balance.
Disbursement
Send money from your balance to a mobile wallet or bank account. Cashout for payroll, suppliers, or refunds.
Transfer
Collect from sender and immediately disburse to a pre-configured destination. No balance held.

Authentication

All requests require your API key in the Authorization header:

HTTP
Authorization: Bearer sk_live_your_api_key_here

Get your live API key from your ScayPay Dashboard after application approval. Use sk_test_ prefix for sandbox testing. Keep your key secret — never expose it in client-side code.

Fee Structure

ScayPay charges transparent, per-transaction fees with no monthly minimums.

ScayPay Fee Schedule

Payment (Collection) — mobile money & QR3% of transaction amount
Payment (Collection) — card5% of transaction amount
Disbursement — any amount3% of transaction amount
Transfer — sender pays by mobile money6% of transaction amount
Transfer — sender pays by card (not available yet)8% of transaction amount

Fee Examples

OperationAmountFeeYou Receive / Pay
Mobile money collectionTZS 50,000TZS 1,500 (3%)TZS 48,500 net
Card collectionTZS 500,000TZS 25,000 (5%)TZS 475,000 net
DisbursementTZS 200,000TZS 6,000 (3%)TZS 206,000 deducted
DisbursementTZS 1,500,000TZS 45,000 (3%)TZS 1,545,000 deducted
Transfer (mobile money)TZS 800,000TZS 48,000 (6%)Sender pays TZS 848,000 · recipient gets TZS 800,000

Fees are deducted from your collected balance for payments and added on top of the amount for disbursements. A transfer does a collection and a payout in one step, so its fee covers both (3% + 3% by mobile money, 5% + 3% by card); the sender pays it on top of the amount and your balance is not touched. All fees are in TZS.

Currencies — You Are Always Charged in TZS

ScayPay settles every payment in Tanzanian Shillings. You may price a collection in another currency by sending its code in currency (for example "USD" with "amount": 25.50), but the customer is always charged the corresponding amount in TZS, converted at ScayPay's exchange rate of the day and rounded up to a whole shilling. Fees, balances, payouts and webhooks are all in TZS.

  • Rates are refreshed once a day. Every request that day uses the same ScayPay rate, from GET /v1/exchange-rates.
  • Responses to a converted payment include an exchange object with the original amount, the rate used and amount_tzs.
JSON — collect USD 25.50 (excerpt)
{ "id":"pay_9f3a2bc7", "status":"pending",
  "amount":{"value":69269,"currency":"TZS"},
  "exchange":{ "currency":"USD", "amount":25.5, "rate":2716.4142,
              "amount_tzs":69269 } }

Exchange Rates API

GET/v1/exchange-rates

Returns ScayPay's rates of the day: how many TZS you are charged for 1 unit of each currency. Works with live and sandbox keys.

QueryDescription
currencyOptionalOne currency code, e.g. USD. Leave out to list all.
amountOptionalWith currency: convert this amount (max 2 decimals) to the TZS you would be charged.
cURL
curl "https://api.scaypay.com/v1/exchange-rates?currency=USD&amount=25.50" \
  -H "Authorization: Bearer sk_live_your_key"
JSON Response — 200
{ "status":"success", "code":200,
  "data": { "base":"TZS", "rate_date":"2026-11-26",
            "currency":"USD", "tzs":2716.4142,
            "amount":25.5, "amount_tzs":69269 } }

Without currency, data.rates is a list of { "currency":"USD", "tzs":2716.4142 } objects. Unknown currency → 404 unsupported_currency.

Today's Exchange Rates — 26 Nov 2026

TZS charged for 1 unit of each currency.

CurrencyTZS
AED739.66
AFN41.23
ALL33.10
AMD7.5368
ANG1,517.55
AOA2.9146
ARS1.7063
AUD1,802.41
AWG1,517.55
AZN1,599.11
BAM1,522.14
BBD1,358.21
BDT21.79
BGN1,522.14
BHD7,224.51
BIF0.9028
BMD2,716.41
BND2,105.91
BOB230.97
BRL460.85
BSD2,716.41
BTN29.23
BWP185.33
BYN908.71
BZD1,358.21
CAD1,900.79
CDF1.1813
CHF3,246.58
CLF105,655.94
CLP2.6730
CNH407.55
CNY406.76
COP0.7726
CRC6.0826
CUP113.18
CVE27.00
CZK121.93
DJF15.28
DKK398.23
DOP45.51
DZD19.79
EGP50.10
ERN181.09
ETB16.82
EUR2,976.89
FJD1,175.28
FKP3,559.24
FOK398.24
GBP3,558.78
GEL1,047.35
GGP3,559.24
GHS228.71
GIP3,559.24
GMD36.31
GNF0.3068
GTQ355.53
GYD12.99
HKD346.40
HNL101.03
HRK395.12
HTG20.71
HUF8.0539
IDR0.1490
ILS813.35
IMP3,559.24
INR29.23
IQD1.7928
IRR0.0015
ISK21.70
JEP3,559.24
JMD17.15
JOD3,831.33
JPY17.06
KES20.90
KGS31.06
KHR0.6679
KID1,802.65
KMF6.0513
KRW2.0227
KWD8,720.43
KYD3,259.83
KZT5.9053
LAK0.1218
LBP0.0304
LKR8.1715
LRD16.36
LSL154.95
LYD420.24
MAD271.77
MDL148.52
MGA0.5919
MKD48.61
MMK1.2947
MNT0.7495
MOP336.31
MRU66.71
MUR57.78
MVR176.08
MWK1.5570
MXN140.20
MYR660.04
MZN42.64
NAD154.95
NGN1.9874
NIO73.96
NOK277.16
NPR18.27
NZD1,487.55
OMR7,064.80
PAB2,716.41
PEN782.22
PGK600.19
PHP42.60
PKR9.8296
PLN667.77
PYG0.4242
QAR746.27
RON557.36
RSD25.30
RUB33.14
RWF1.8331
SAR724.38
SBD337.58
SCR191.24
SDG6.0401
SEK265.29
SGD2,105.91
SHP3,559.24
SLE118.47
SLL0.1185
SOS4.7545
SRD72.43
SSP0.4721
STN121.51
SYP22.35
SZL154.95
THB80.04
TJS294.53
TMT776.14
TND888.15
TOP1,126.11
TRY53.61
TTD402.08
TVD1,802.65
TWD82.52
UAH59.93
UGX0.6648
USD2,716.41
UYU67.02
UZS0.2269
VES2.9444
VND0.1054
VUV22.45
WST972.02
XAF4.5385
XCD1,006.08
XCG1,517.55
XDR3,647.66
XOF4.5385
XPF24.95
YER11.50
ZAR154.93
ZMW130.81
ZWG102.42
ZWL102.42

Quick Start

cURL
curl -X POST https://api.scaypay.com/v1/payments/collect \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-znz-001" \
  -d '{
    "payment_type": "mobile",
    "amount": 50000,
    "currency": "TZS",
    "phone": "+255758243132",
    "customer": { "name": "Amani Juma", "email": "amani@example.co.tz" },
    "reference": "ORD-ZNZ-001",
    "webhook_url": "https://yourapp.co.tz/webhooks/scaypay"
  }'

Payment — Mobile Money

POST/v1/payments/collect

Customer receives a push notification on their phone and enters their PIN to authorize. Supported: M-Pesa (Vodacom TZ), Airtel Money, Mixx By Yas (Mixx by Yas), Halotel.

FieldTypeDescription
payment_typestringRequiredMust be "mobile"
amountnumberRequiredWhole TZS, or up to 2 decimals for another currency. Charged amount (in TZS) — min: 200 · max: 10,000,000
currencystringOptional"TZS" (default) or any code from Exchange Rates. Always charged in TZS at ScayPay's rate — see Currencies.
phonestringRequiredE.164 format e.g. +255758243132
customer.namestringRequiredCustomer full name
customer.emailstringRequiredCustomer email address
referencestringRequiredYour order/reference ID (max 30 chars)
webhook_urlstringOptionalHTTPS URL for status updates
descriptionstringOptionalShown to customer (max 100 chars)
JSON Response
{ "id":"pay_9f3a2bc7", "status":"pending", "amount":{"value":50000,"currency":"TZS"},
  "phone":"+255758243132", "network":"Vodacom TZ",
  "fee": {"value":1500,"currency":"TZS"},
  "expires_at":"2026-05-05T18:00:00Z" }

Payment — Card (Hosted Checkout)

POST/v1/payments/collect with "payment_type": "card"

For card payments, ScayPay returns a checkout_url — you must redirect your customer there to complete payment on the secure hosted checkout page. Supported: Visa, Mastercard, local debit cards.

cURL
curl -X POST https://api.scaypay.com/v1/payments/collect \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_type": "card",
    "amount": 150000,
    "currency": "TZS",
    "phone": "+255758243132",
    "customer": {
      "name": "Amani Juma", "email": "amani@example.co.tz",
      "address": "Chikai House, M/kwerekwe",
      "city": "Zanzibar", "state": "ZNZ",
      "postcode": "71000", "country": "TZ"
    },
    "redirect_url": "https://yourapp.co.tz/payment/success",
    "cancel_url":   "https://yourapp.co.tz/payment/cancel",
    "reference": "ORD-ZNZ-002",
    "webhook_url": "https://yourapp.co.tz/webhooks/scaypay"
  }'
JSON Response
{ "id":"pay_2e0bcc5f", "status":"pending",
  "checkout_url": "https://checkout.scaypay.com/pay/W0SzdUSHQm",
  "payment_type": "card",
  "amount":{"value":150000,"currency":"TZS"},
  "fee":{"value":4500,"currency":"TZS"},
  "expires_at":"2026-05-05T18:00:00Z" }

Important: After receiving the response, immediately redirect your customer to checkout_url. The payment expires if not completed within 4 hours. After payment, the customer is redirected to your redirect_url (success) or cancel_url (cancelled).

PHP — Redirect to Checkout
<?php
$response = json_decode($apiResponse, true);
if ($response['status'] === 'success' && isset($response['data']['checkout_url'])) {
    header('Location: ' . $response['data']['checkout_url']);
    exit;
}

Payment — Dynamic QR

POST/v1/payments/collect with "payment_type": "dynamic-qr"

Returns a QR code string for the customer to scan with their mobile money app. Ideal for in-person and POS payments. Only amount and currency are required.

JSON Response
{ "id":"pay_6a490816", "status":"pending",
  "payment_qr_code": "000201010212041552...",
  "checkout_url": "https://checkout.scaypay.com/qr/Ax7kM2",
  "amount":{"value":25000,"currency":"TZS"},
  "fee":{"value":750,"currency":"TZS"} }

Check Status & List Payments

GET/v1/payments/{id} — get a single payment by ID

GET/v1/payments — list payments with optional filters:

Query ParamDescription
statusFilter: pending, completed, failed
fromStart date: YYYY-MM-DD
toEnd date: YYYY-MM-DD
limitResults per page (max 100, default 20)
pagePage number (default 1)

Payment status values: pending · completed · failed · voided · expired · cancelled

Account Balance

GET/v1/payments/balance

Returns your account's collected balance — calculated from your completed transactions. This is your own balance, not a shared balance.

JSON Response
{
  "available":        {"currency":"TZS","value":1500000},
  "balance":          {"currency":"TZS","value":1500000},
  "total_collected":  {"currency":"TZS","value":2000000},
  "total_sent_out":   {"currency":"TZS","value":500000},
  "fees_paid":        {"currency":"TZS","value":5250},
  "completed_transactions": 42,
  "plan": "business"
}

Account Name Lookup

Before you send money, look up the registered holder name of a mobile wallet or bank account and show it to your user to confirm. Use the returned account_name as recipient_name when you call /v1/disbursements/send. Lookups are free.

POST/v1/accounts/lookup

FieldDescription
typeRequired"mobile" or "bank"
phoneMobileTanzanian number in any format: 0712345678, 255712345678 or +255 712 345 678
networkOptionalvodacom, airtel, tigo, halotel, ttcl or zantel. Detected from the number if left out; send it for ported numbers.
bank_codeBankAny code from All Supported Bank Codes, e.g. NMB, PBZ, CRDB. Every listed bank is checked.
account_numberBankBank account number (6–30 letters or digits)
cURL — mobile wallet
curl -X POST https://api.scaypay.com/v1/accounts/lookup \
  -H "Authorization: Bearer scp_your_live_key" \
  -H "Content-Type: application/json" \
  -d '{ "type":"mobile", "phone":"0754000000" }'
JSON Response — 200
{ "status":"success", "code":200,
  "data": { "type":"mobile", "account_name":"JANE DOE", "verified":true,
            "phone":"255754000000", "network":"vodacom" } }
cURL — bank account
-d '{ "type":"bank", "bank_code":"CRDB", "account_number":"0150123456700" }'

{ "status":"success", "code":200,
  "data": { "type":"bank", "account_name":"DUKA BORA LTD", "verified":true,
            "bank_code":"CRDB", "account_number":"0150123456700" } }
HTTPerror_codeMeaning
400invalid_phone · unknown_network · invalid_account · invalid_bankFix the input and try again
404not_foundNo registered holder for these details. Don't send money.
429rate_limitedMore than 10 lookups a minute. Wait and retry.
503lookup_unavailableThe network or bank didn't answer. Retry shortly.

Results are cached for 24 hours. Sandbox keys (sk_test_) always return a sample name and never contact a network.

Disbursement — Mobile Money Cashout

Disbursements send money out from your ScayPay balance to a recipient. The total (amount + fee) is deducted immediately. If the payout fails, funds are automatically returned.

The response status is completed when the money has already arrived, or pending while it is still processing; you then get a payout.completed or payout.failed webhook. A payout rejected outright returns 502 disbursement_error and nothing is deducted. If payouts are temporarily unavailable on ScayPay's side you get 503 payouts_unavailable (nothing is deducted; retry later).

POST/v1/disbursements/send

Fee: 3% of the amount

Example: sending TZS 800,000 → fee TZS 24,000 · total deducted TZS 824,000
FieldDescription
amountRequiredTZS amount to send. Min: 5,000
channelRequired"mobile" for mobile money
recipient_phoneRequiredRecipient phone (+255XXXXXXXXX). Network auto-detected.
recipient_nameRequiredRecipient full name
narrationOptionalPayment reason (shown on statement)
webhook_urlOptionalHTTPS URL for status notifications
metadataOptionalKey-value object (returned in webhook)
cURL
curl -X POST https://api.scaypay.com/v1/disbursements/send \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: payout-may2025-emp001" \
  -d '{
    "amount": 250000,
    "channel": "mobile",
    "recipient_phone": "+255758243132",
    "recipient_name": "Amani Juma",
    "narration": "Salary May 2026",
    "webhook_url": "https://yourapp.co.tz/webhooks/scaypay"
  }'
JSON Response
{ "id":"dib_667c9279", "status":"pending",
  "amount":{"value":250000,"currency":"TZS"},
  "fee":{"value":7500,"currency":"TZS"},
  "total_deducted":{"value":257500,"currency":"TZS"},
  "recipient":{"name":"Amani Juma","phone":"+255758243132"},
  "network":"Vodacom TZ" }

Disbursement — Bank Transfer

POST/v1/disbursements/send with "channel": "bank"

Payouts to CRDB are temporarily unavailable. Requests to this bank (disbursements and bank transfers) return 503 bank_unavailable. Use mobile money or another bank in the meantime.
FieldDescription
amountRequiredTZS amount. Min: 5,000
channelRequiredMust be "bank"
recipient_bankRequiredBank code from the list below
recipient_accountRequiredBank account number
recipient_nameRequiredAccount holder name
narrationOptionalPayment reference
cURL
-d '{ "amount":500000, "channel":"bank",
     "recipient_bank":"NMB", "recipient_account":"21000012345678",
     "recipient_name":"Fatuma Hassan", "narration":"Invoice INV-2026-ZNZ-001" }'

All Supported Bank Codes (Tanzania)

Use the Code value as the recipient_bank field for bank disbursements and transfer profiles.

Absa Bank Tanzania ABSA
Access Bank Tanzania ACCESS
Akiba Commercial Bank AKIBA
Amana Bank AMANA
Azania Bank AZANIA
Bank of Baroda Tanzania BARODA
Bank of Africa Tanzania BOA
Citibank Tanzania CITI
CRDB Bank (payouts paused) CRDB
Diamond Trust Bank Tanzania DTB
Ecobank Tanzania ECOBANK
Equity Bank Tanzania EQUITY
Exim Bank Tanzania EXIM
First National Bank Tanzania FNB
Habib African Bank HABIB
I&M Bank Tanzania IMBANK
KCB Bank Tanzania KCB
National Bank of Commerce NBC
NCBA Bank Tanzania NCBA
NMB Bank NMB
People's Bank of Zanzibar PBZ
Standard Chartered Tanzania SCB
Stanbic Bank Tanzania STANBIC
Tanzania Commercial Bank TCB
TIB Development Bank TIB
United Bank for Africa Tanzania UBA
Uchumi Commercial Bank UCHUMI
Zenith Bank Tanzania ZENITH
Bank of Tanzania (Gov only) BOT

Calculate Disbursement Fee

GET/v1/disbursements/fee?amount=500000

Always calculate the fee before sending to ensure sufficient balance.

JSON Response
{ "amount":500000, "fee_amount":15000, "total_amount":515000, "currency":"TZS",
  "fee_breakdown": "3% of TZS 500,000" }

Transfer — How It Works

A Transfer collects money from a sender and immediately disburses it to a pre-configured destination — all in one API call. No funds are held in your balance. A Transfer Profile must exist before initiating any transfer.

1️⃣
Create Profile
Define payout destination (phone or bank)
2️⃣
Initiate Transfer
Reference the profile + specify sender + amount
3️⃣
Auto Disburse
Funds collected from sender → sent to destination instantly

Transfer — Payout Profiles

POST/v1/transfers/profiles — create a destination profile (required before transfers)

cURL — Mobile Profile
-d '{ "name":"Zanzibar Store", "channel":"mobile",
     "recipient_name":"Fatuma Hassan", "recipient_phone":"+255710578275" }'
cURL — Bank Profile
-d '{ "name":"Company Bank", "channel":"bank",
     "recipient_name":"Fatuma Hassan", "recipient_bank":"NMB",
     "recipient_account":"21000012345678" }'
JSON Response
{ "profile_id":"tpf_8a3b2c1d", "name":"Zanzibar Store",
  "channel":"mobile", "recipient":{"name":"Fatuma Hassan","phone":"+255710578275"} }

GET/v1/transfers/profiles — list all profiles.

Initiate a Transfer

POST/v1/transfers/initiate

Fee: 6% of the amount (collection 3% + payout 3%)

The fee is added to what the sender pays; the recipient gets the full amount. Example: TZS 150,000 → sender pays TZS 159,000 · recipient gets TZS 150,000
FieldDescription
profile_idRequiredID from a Transfer Profile
amountRequiredTZS amount. Min 5,000 · Max 10,000,000
sender_phoneRequiredPhone to collect from
sender_nameRequiredSender's full name
referenceRequiredYour reference ID (max 30 chars)
cURL
curl -X POST https://api.scaypay.com/v1/transfers/initiate \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Idempotency-Key: txf-znz-001" \
  -d '{ "profile_id":"tpf_8a3b2c1d", "amount":150000,
        "sender_phone":"+255758243132", "sender_name":"Amani Juma",
        "reference":"TXF-ZNZ-001" }'

Transfer status flow: collecting → disbursing → completed · or failed

Webhook Events

ScayPay sends HTTP POST to your webhook_url for every status change. Respond with HTTP 200 within 30 seconds.

EventDescription
payment.completedPayment collected successfully
payment.failedPayment failed or rejected by customer
payment.expiredPayment expired (4-hour window)
payment.cancelledCustomer never completed the prompt (ignored or timed out); nothing was charged
disbursement.completedCashout delivered to recipient
disbursement.failedCashout failed — balance restored
disbursement.reversedCashout reversed after completion
transfer.completedCollected + disbursed successfully
transfer.failedFailed at collection or disbursement
daily_limit.warning80% of daily collection limit reached

Webhook Payload

JSON
{ "id":"evt_a1b2c3d4", "type":"payment.completed", "api_version":"2026-01",
  "created_at":"2026-05-05T14:32:18Z",
  "data":{ "id":"pay_9f3a2bc7", "status":"completed",
    "amount":{"value":50000,"currency":"TZS"},
    "fee":{"value":1500,"currency":"TZS"},
    "net":{"value":48500,"currency":"TZS"},
    "reference":"ORD-ZNZ-001", "phone":"+255758243132" } }

Verify Webhook Signature

Each webhook includes X-ScayPay-Signature. Verify in production to prevent spoofing.

PHP
<?php
$payload   = file_get_contents('php://input');
$timestamp = $_SERVER['HTTP_X_SCAYPAY_TIMESTAMP'];
$signature = $_SERVER['HTTP_X_SCAYPAY_SIGNATURE'];
$secret    = 'your_webhook_signing_secret';

if (abs(time() - (int)$timestamp) > 300) { http_response_code(400); exit; } // replay protection

$expected = hash_hmac('sha256', $timestamp . '.' . $payload, $secret);
if (!hash_equals($expected, $signature)) { http_response_code(401); exit; }

$event = json_decode($payload, true);
http_response_code(200); echo 'OK';

Receiving Webhooks

When you include a webhook_url in your API requests, ScayPay will send HTTP POST notifications to your endpoint for every status change.

Headers Sent by ScayPay

HeaderDescription
X-Webhook-EventEvent type e.g. payment.completed
X-Webhook-TimestampUnix timestamp when event occurred
X-Webhook-SignatureHMAC-SHA256 signature for verification
User-AgentScayPay-Webhook/1.0
Content-Typeapplication/json

Signature Verification

Verify every incoming webhook to ensure it's from ScayPay. The signature is computed as:

Formula
X-Webhook-Signature = hex(HMAC-SHA256(signing_key, "{timestamp}.{raw_body}"))
PHP — Verification
<?php
$rawBody   = file_get_contents('php://input');
$timestamp = $_SERVER['HTTP_X_WEBHOOK_TIMESTAMP'] ?? '';
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';
$secret    = 'your_webhook_signing_secret';

// Reject stale webhooks (> 5 minutes old)
if (abs(time() - (int)$timestamp) > 300) {
    http_response_code(400); exit('Stale webhook');
}

$expected = hash_hmac('sha256', $timestamp . '.' . $rawBody, $secret);
if (!hash_equals($expected, $signature)) {
    http_response_code(401); exit('Invalid signature');
}

$event = json_decode($rawBody, true);

switch ($event['type']) {
    case 'payment.completed':
        // Fulfill order, update database
        $amount    = $event['data']['amount']['value'];
        $reference = $event['data']['reference'];
        // your logic here
        break;
    case 'payment.failed':
        // Notify customer
        break;
    case 'disbursement.completed':
        // Payout confirmed
        break;
}

http_response_code(200);
echo 'OK';
Node.js — Verification
const crypto = require('crypto');

app.post('/webhooks/scaypay', express.raw({ type: 'application/json' }), (req, res) => {
  const timestamp = req.headers['x-webhook-timestamp'];
  const signature = req.headers['x-webhook-signature'];
  const secret    = process.env.SCAYPAY_WEBHOOK_SECRET;

  // Reject stale webhooks
  if (Math.abs(Date.now() / 1000 - parseInt(timestamp)) > 300) {
    return res.status(400).send('Stale');
  }

  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.${req.body.toString()}`)
    .digest('hex');

  if (!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature))) {
    return res.status(401).send('Invalid signature');
  }

  const event = JSON.parse(req.body);
  console.log('Event:', event.type, event.data.reference);
  res.status(200).send('OK');
});

Best Practices

  • Always verify the signature in production
  • Respond with HTTP 200 within 30 seconds
  • Process events asynchronously (queue) to avoid timeouts
  • Deduplicate using the event id field
  • Reject webhooks older than 5 minutes (X-Webhook-Timestamp)

Sandbox Environment

The sandbox environment lets you test your integration without processing real money. Sandbox payments complete instantly — no USSD push, no waiting.

Instant
All payments complete immediately
No real money
Collections & payouts are simulated
Free forever
No payment required to test
Logged
Transactions appear in your sandbox history

Sandbox API Keys

Sandbox keys have the prefix sk_test_ instead of scp_. Your sandbox key is available on your Sandbox page — no payment required.

Sandbox Auth Header
Authorization: Bearer sk_test_your_sandbox_key

The base URL is the same for both live and sandbox: https://api.scaypay.com/v1. ScayPay detects the key prefix and routes accordingly.

Key PrefixEnvironmentReal Money?Response Speed
scp_Live Yes~2–8 seconds (USSD)
sk_test_Sandbox NoInstant (~50ms)

Sandbox Quick Test

cURL — Sandbox Payment
curl -X POST https://api.scaypay.com/v1/payments/collect \
  -H "Authorization: Bearer sk_test_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_type": "mobile",
    "amount": 50000,
    "currency": "TZS",
    "phone": "+255758243132",
    "customer": { "name": "Test User", "email": "test@example.co.tz" },
    "reference": "TEST-001"
  }'
Response (Sandbox — Instant Complete)
{
  "status": "success", "code": 201,
  "data": {
    "status": "completed",
    "amount": { "value": 50000, "currency": "TZS" },
    "fee":    { "value": 1500,   "currency": "TZS" },
    "net":    { "value": 48500, "currency": "TZS" },
    "network": "Sandbox",
    "sandbox": true,
    "note": "Sandbox mode: no real money collected."
  }
}

Error Codes

HTTPerror_codeDescription
400validation_errorInvalid or missing field
400unsupported_currencyCurrency has no ScayPay rate (see Exchange Rates)
503bank_unavailablePayouts to this bank are temporarily paused. Use mobile money or another bank.
503rates_unavailableToday's exchange rates are not loaded yet. Retry shortly.
401unauthorizedInvalid or missing API key
403insufficient_scopeKey lacks required permission
404not_foundResource doesn't exist
429rate_limitedToo many requests (name lookup: 10 per minute)
422idempotency_conflictKey reused with different body
429rate_limit_exceeded60 req/min exceeded
500payment_failedUpstream failure (retry with backoff)

Rate Limits & Tier Limits

60 requests/minute. Response headers: X-Ratelimit-Limit, X-Ratelimit-Remaining, X-Ratelimit-Reset.

PlanAccess FeeMax Daily CollectionMax / Transaction
StudentTZS 1,000,000TZS 1,000,000
BasicTZS 10,000,000TZS 10,000,000
BusinessTZS 100,000,000TZS 10,000,000
EnterpriseTZS 500,000,000TZS 10,000,000

Idempotency

Include Idempotency-Key on all POST requests to prevent duplicates on retry. Keys must be ≤ 30 chars, valid for 24 hours.

HTTP Header
Idempotency-Key: order-znz-001-attempt-1

Need Help?

support@scaypay.com  ·  +255 710 578 275  ·  +255 758 243 132 (WhatsApp)
Chikai House, M/kwerekwe, Zanzibar, Tanzania