COUNTRY-BY-COUNTRY · INTEGRATION GUIDE
Checked against MyFatoorah’s developer documentation on 5 Dec 2026, 09:30 Asia/Gaza. The Embedded Payment v3 page was last modified 30 Oct 2026; the key and webhook pages in Feb 2026.
Where does your MyFatoorah integration point? Status by country
Source: MyFatoorah API key page, Embedded Payment v3, Fawry.
THE SHORT ANSWER
MyFatoorah is not one API but several: Saudi Arabia, the UAE, Qatar and Egypt each have their own API host, Kuwait, Bahrain, Jordan and Oman share one, and every enabled country needs its own API token. New integrations should use the /v3 Embedded Payment flow (session on your server, card form on your page, no PCI DSS certificate needed according to MyFatoorah), never the old /v2 endpoints.
The two mistakes that cost stores money: treating paymentCompleted: true as “paid” (MyFatoorah says it does not show the payment status), and accepting webhooks without checking the myfatoorah-signature HMAC. Confirm every order with a signed Webhook v2 event plus a Get Payment Details call.
At iFynx we build checkout flows for stores and apps in Saudi Arabia, the UAE, Qatar and Kuwait, and MyFatoorah comes up in almost every multi-country project because one company account can cover eight markets. This guide maps what changes per country, which integration type to choose, how the v3 embedded flow works step by step, and how to verify webhooks, using only what MyFatoorah’s own documentation says.

Why does my MyFatoorah token work in Kuwait but not in Saudi Arabia?
Because each enabled country in a multi-country account has its own token, and the token must be sent to that country’s host. A Kuwait token sent to api-sa.myfatoorah.com, or a Saudi token sent to the shared api.myfatoorah.com host, will not reach the right account. Keep a small config map in your backend: country code to host and to the secret name of its token, and choose both from the order’s country, never from a single global setting.
Keys are created from the Super Master account under Integration Settings, API Key, Add. Each key has a name, an expiry date, an active flag and permissions such as Create Payments or Update Payments. Three details from the API key page catch teams later:
- You can create up to 5 API keys only, so do not burn them on every developer laptop.
- A key without the right permission returns 401 with “The token does not have the required permissions!”. That is a settings problem, not a code bug.
- If the portal user who created a token is disabled, the token is disabled too. Create production keys from an account that will not be removed when staff leave, and put the expiry date in your calendar.
Which MyFatoorah integration should a Saudi or UAE store choose?
| Type | How it works | Methods | PCI DSS | Best for |
|---|---|---|---|---|
| Embedded Payment (v3) | Card form on your page, then MyFatoorah’s OTP page | Visa/Mastercard, mada, Amex; Apple Pay, Google Pay, STC Pay; other methods redirect | Not needed (per MyFatoorah) | Recommended default |
| Hosted Payment Page | Customer is redirected to the gateway | All enabled methods, e.g. KNET, BENEFIT | Not needed | Local debit networks |
| Invoicing | One Create Payment call sends a pay link by email, SMS or both | Enabled methods | Not needed | Sales teams, B2B, WhatsApp orders |
| Direct Payment | Your server handles card data | Card, Apple Pay, Samsung Pay | PCI certificate required | Only if you are already PCI certified |
Source: Technical guide overview and Overview. Which methods your account can use is switched on by your MyFatoorah account manager (live) or by email to their team (demo). Minimum TLS version: 1.2.
How does the MyFatoorah v3 embedded checkout work, step by step?
Create a session on your server
POST /v3/sessions with PaymentMode COMPLETE_PAYMENT and the order amount. The response gives SessionId, SessionExpiry and an EncryptionKey. One session per payment: a SessionId is valid for one payment only.
Load session.js for the right country
Sandbox demo.myfatoorah.com/sessions/v1/session.js; live from sa., ae., qa., eg. or portal.myfatoorah.com. Then myfatoorah.init({sessionId, callback, containerId}).
Handle the callback
With shouldHandlePaymentUrl true (default), card wallets finish on the page and return paymentData, encrypted with the session key. KNET or BENEFIT redirect the shopper and come back with a paymentId. With false, you get a redirectionUrl to handle yourself.
Wait for the signed webhook
Event 1 PAYMENT_STATUS_CHANGED arrives server to server. Verify the HMAC first, then read it.
Confirm with Get Payment Details
Mark the order paid only after your server reads the final status from MyFatoorah. MyFatoorah: “Always use Webhook with the Get Payment Details endpoint to confirm the final payment status.”
There is a second mode, COLLECT_DETAILS: the page only collects the card, and your server then calls POST /v3/payments with the SessionId and amount, gets a PaymentURL and redirects the shopper. The docs warn that the operation type and the 3-D Secure model cannot change between the session call and the payment call. It suits flows where the final amount is known only after the card is entered, such as delivery fees.
WARNING · paymentCompleted IS NOT PAID
The embedded callback returns paymentCompleted: true when the shopper finishes the step, and MyFatoorah states plainly that this flag “does not indicate the payment status”. A declined card can still end the step. If your frontend sends the shopper to “Thank you” and your backend ships on that signal, you can ship unpaid orders. Decrypt paymentData with the session EncryptionKey if you want an early hint (the docs give sample code in Python, C# and Node.js), but the order state must come from the webhook plus Get Payment Details.
Which webhook events does MyFatoorah send, and how do I verify them?
In Webhook v2 every call carries an Event object (Code, Name, CountryIsoCode, CreationDate in UTC ISO 8601, and a unique Reference) plus a Data object. Turn it on in the portal under Integration Settings, Webhook Settings: enable the feature, add your HTTPS endpoint, tick the events, choose V2 and set retries. MyFatoorah allows up to 5 retries with up to 180 seconds of delay in v2, so your endpoint must be idempotent: store the Reference and ignore repeats.
Signature check, as the webhook signature page describes it:
- Take the fields of the event’s data model in the order the docs list them for that event type.
- Join them as
key=value,key2=value2; a null value becomes an empty string (for exampleCustomerEmail=). - Encode the string and your portal secret key as UTF-8.
- Compute HMAC-SHA256 with the secret key and Base64-encode the result.
- Compare it with the
myfatoorah-signatureheader. If it does not match, return an error and do nothing else.
If two webhook events arrive for the same transaction and one has TransactionStatus SUCCESS, the docs say to mark the order paid and ignore the other.
| Webhook v1 | Webhook v2 | |
|---|---|---|
| Envelope | EventType + Event + DateTime (ddMMyyyyHHmmss) | Event {Code, Name, CountryIsoCode, CreationDate, Reference} |
| Retries | Up to 4, every 10 seconds | Configurable: max 5 retries, max 180 s delay |
| Secret key | Highly recommended | Described as mandatory on the v2 page |
| Unique id per call | No | Yes, Event.Reference |
Where MyFatoorah’s own docs disagree (checked 5 Dec 2026)
- The Webhook v2 introduction says the secret key “is now mandatory”; the signature page calls signing optional but recommended. Treat it as mandatory: set the key and reject unsigned calls.
- The Webhook v2 page points to Get Payment Status; the v3 Embedded page points to Get Payment Details. Use whichever your account’s API version documents, and log the full response.
- The pages we read do not list test card numbers, the full payment status list or the exact field order for each event signature. Those are on separate pages; read them for your event types before go-live.
Why is my MyFatoorah integration failing? Symptom, cause, fix
Causes come from MyFatoorah’s documentation listed in the sources. For problems shared with other Gulf gateways (decimals, 3-D Secure, refunds, BNPL capture), see our 15 Gulf gateway integration failures.
MyFatoorah go-live checklist for Saudi Arabia, the UAE and Qatar
- ✓ One live token per country, stored as a secret, never in the app bundle
- ✓ Host chosen from the order’s country (api-sa / api-ae / api-qa / api)
- ✓ All calls on /v3; no /v2 code left from old samples
- ✓ TLS 1.2 or higher on every server that calls MyFatoorah
- ✓ Webhook V2 enabled, HTTPS endpoint, secret key set, unsigned calls rejected
- ✓ Event.Reference stored; repeated deliveries ignored
- ✓ Order marked paid only after Get Payment Details
- ✓ Apple Pay domain verified; mada, STC Pay, KNET, BENEFIT enabled by the account manager where needed
- ✓ Refund flow tested (partial and full) and recorded on the order
- ✓ Key expiry dates in the team calendar; keys owned by a stable admin user
If you sell in Saudi Arabia, your payment receipts also feed your ZATCA e-invoices; refunds need credit notes. Our ZATCA integration demo shows that side. In Qatar there is no VAT today, so the checkout work is mainly payments; see our Qatar software page for what we build there.
How iFynx can help
iFynx builds and fixes MyFatoorah checkouts for web stores and Flutter, iOS and Android apps across Saudi Arabia, the UAE, Qatar and Kuwait: per-country token setup, v3 embedded checkout, signed Webhook v2 handling, refunds and the receipts that feed ZATCA e-invoices. We also compare MyFatoorah with Tap, Moyasar, PayTabs and others for your markets before you sign.
Talk to iFynx about your checkout · Compare Gulf payment gateways · App development cost
Frequently asked questions
What is the MyFatoorah API URL for Saudi Arabia, the UAE and Qatar?
Saudi Arabia uses https://api-sa.myfatoorah.com/, the UAE https://api-ae.myfatoorah.com/, Qatar https://api-qa.myfatoorah.com/ and Egypt https://api-eg.myfatoorah.com/. Kuwait, Bahrain, Jordan and Oman share https://api.myfatoorah.com/. The sandbox for all is https://apitest.myfatoorah.com/.
Can I use one MyFatoorah API token for all countries?
No. Each enabled country in a multi-country account has its own token, and you can create up to 5 API keys in total. Pick the token and host from the order’s country.
Do I need PCI DSS to use MyFatoorah?
Not for Embedded Payment, Hosted Payment Page or Invoicing, according to MyFatoorah. Direct Payment, where your server handles card data, requires a PCI certificate.
Does paymentCompleted: true mean the customer paid?
No. MyFatoorah says the flag does not indicate the payment status. Confirm with a signed webhook and the Get Payment Details endpoint before marking the order paid.
How do I verify a MyFatoorah webhook signature?
Build the key=value string from the event’s data fields in the documented order, compute HMAC-SHA256 with your portal secret key, Base64-encode it and compare it with the myfatoorah-signature header.
Should I use MyFatoorah API v2 or v3?
v3. MyFatoorah’s Embedded Payment page says older /v2 versions should not be used for new integrations.
Who can build a MyFatoorah checkout for my store or app?
iFynx builds and fixes MyFatoorah integrations for web stores and mobile apps in Saudi Arabia, the UAE, Qatar and Kuwait, with per-country setup and signed webhook handling.
Related reading
- Gulf payment gateway integration problems: 15 failures and how to fix them
- Tap Payments integration guide: mada, KNET, QPay, BENEFIT and Fawry in 5 days
- Gulf payment gateways compared (hub)
- Fawran vs cards in Qatar: QCB October 2026 payment data
Sources (read 5 Dec 2026): Overview · Technical guide overview · Embedded Payment v3 (modified 30 Oct 2026) · API key · Webhook V2 · Webhook signature · Webhook information · Webhook V1 · Fawry x MyFatoorah, 15 Feb 2023
Every Sunday: the most serious confirmed CVEs and breaches, who is exposed in Saudi Arabia, the UAE and Egypt, and what to patch first. Free, in English and Arabic, one-click unsubscribe.
✓ You’re subscribed. A welcome email is on its way; the first issue arrives on Sunday.
How this article was made: researched and drafted with AI assistance, with facts checked against the primary sources. Editorial lead: Ahmed Alsafadi. Read our editorial policy.