Local bank cards (redirect)
One call: confirm returns a hosted checkout URL. After payment the customer returns to return_url and a signed callback is POSTed to callback_url.
POST /api/v1/transaction/localbankcards/confirm
| Field | Required | Notes |
|---|---|---|
amount, invoice_no, return_url |
yes | |
callback_url |
no | must be public (no localhost in live) |
mobile_number, email, lang (ar/en) |
no |
Response: { "status": 200, "result": { "code": "CHECKOUT_REDIRECT", "redirect_url": "...", "transaction_id": "TRX_..." } }
return_url (GET) / callback_url (POST JSON)
gateway, approved (1/0), canceled (only on cancel), invoice_no, amount (XX.XX), transaction_id, hashed (+ payment_method, environment in the callback; header X-Sela-Signature).
Verifying hashed
- Take all fields except
hashed, in the order received. - Build a query string
key=value&key=value(RFC 3986, e.g.http_build_query). - HMAC-SHA256 with your Secret Key from the dashboard.
- Upper-case and compare with
hashed.
Always require approved == 1 and a valid signature; treat the callback as the source of truth.