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 .net hosts 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.

FieldRequired
accountYes. eDahab: 62… or 25262…. Waafi: 61… / 63… or 25261… / 25263…. Premier sandbox: 00….
gatewayYes: waafi, edahab, or pbwallet
amountYes
currencyYes: USD or SLSH (not SOS). Premier Wallet is USD only.
order_idRecommended
webhook_urlOptional. Public HTTPS URL we POST after the charge finishes. See Webhooks.
gatewayMethod
waafiWaafi, and also EVC, ZAAD, SAHAL
edahabeDahab
pbwalletPremier 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.

codeMeaningWhat to do
601PaidSave sid, mark the order paid
603Waiting on the phoneAsk them to approve, then poll verify. Don’t charge again. Stop on 601 or 600/604.
604Not enough balanceAsk them to top up
600FailedShow 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


Did this page help you?