e-Wallet API
Charge a wallet from your server. Charge, read the code, verify if you need to.
Your backend already has the customer’s wallet number. You post JSON and get a result back.
Testing on staging? Use the
.nethosts from Sandbox. Examples below use live hosts.
If you’d rather not collect the phone, use hosted checkout.
Keep API keys on the server.
POST https://api.sifalopay.com/gateway/ with HTTP Basic. Timeout 120 seconds — eDahab is often slow. Optional: pass webhook_url to get status pushed to your server (Webhooks). You can still look up status with verify.
1. Charge
curl -X POST "https://api.sifalopay.com/gateway/" \
-u "$SIFALO_API_USER:$SIFALO_API_KEY" \
-H "Content-Type: application/json" \
--max-time 120 \
-d '{
"account": "25262XXXXXXX",
"gateway": "edahab",
"amount": "100",
"currency": "USD",
"order_id": "ABC123"
}'Placeholders, not sandbox numbers. Test wallets: Sandbox.
| Field | Required |
|---|---|
account | Yes. eDahab: 62… or 25262…. Waafi: 61… / 63… or 25261… / 25263…. Premier sandbox: 00…. |
gateway | Yes: waafi, edahab, or pbwallet |
amount | Yes |
currency | Yes: USD or SLSH (not SOS). Premier Wallet is USD only. |
order_id | Recommended |
webhook_url | Optional. Public HTTPS URL we POST after the charge finishes. See Webhooks. |
gateway | Method |
|---|---|
waafi | Waafi, and also EVC, ZAAD, SAHAL |
edahab | eDahab |
pbwallet | Premier Wallet |
Cards go through hosted checkout. Refunds: Refunds. PHP / Node: e-Wallet (PHP / Node).
2. Read the code
HTTP is usually 200. Look at code.
code | Meaning | What to do |
|---|---|---|
601 | Paid | Save sid, mark the order paid |
603 | Waiting on the phone | Ask them to approve, then poll verify. Don’t charge again. Stop on 601 or 600/604. |
604 | Not enough balance | Ask them to top up |
600 | Failed | Show response |
Auth and validation errors (0, "404"): Decline codes.
{
"code": "601",
"sid": "ABCDEF",
"response": "Your Transaction has been Processed!"
}Save sid every time. You need it to verify and to refund. Full list: Decline codes.
3. Verify (when you need it)
After 603, after a timeout, or whenever you want the latest status. Verify does not use Basic auth.
curl -X POST "https://api.sifalopay.com/gateway/verify.php" \
-H "Content-Type: application/json" \
-d '{"sid":"ABCDEF"}'Mark paid only if status is success and code is 601. amount is what the customer paid.
{
"sid": "ABCDEF",
"account": "25262XXXXXXX",
"payment_type": "EDAHAB",
"amount": "100",
"currency": "USD",
"response": "Your Transaction has been Processed!",
"status": "success",
"code": 601
}payment_type is EDAHAB, ZAAD (Waafi — not "WAAFI"), PREMIER WALLET, or CARD.
Prefer sid. With only order_id, you get the most recent payment for that id.
If the charge call times out, verify before you charge again. For push updates on e-Wallet charges, see Webhooks.
Next
Updated 27 days ago
