Quick start
- Create an account on the signup page and verify your email. API calls are refused with
ACCOUNT_NOT_VERIFIEDuntil you do. - Create a test key on the API Keys page with the
stk_pushandaccount_apiscopes. Copy the key and its webhook secret; both are shown once. Set the key's webhook URL, or passcallback_urlper request. - Collect with POST /v3/stk-initiate/:
curl -X POST "https://swiftwallet.co.ke/v3/stk-initiate" \ -H "Authorization: Bearer $SWIFTWALLET_API_KEY" \ -H "Content-Type: application/json" \ -d '{"amount": 100, "phone_number": "0712345678", "external_reference": "ORDER-1001"}' - Handle the callback: verify
X-SwiftWallet-Signature(see Webhooks), answer 2xx, then confirm withGET /v3/transactions/?external_reference=ORDER-1001before fulfilling. - Go live: create an
sk_live_key, complete KYC and keep it on your server only.
Signed in? Try any endpoint from the API playground with your test key.