Technology in Paymentsالتقنية في المدفوعات
The systems behind the rules. This chapter opens up a payment platform layer by layer — channels, gateways and orchestration, ledgers and connectors — and follows one authorisation through them in milliseconds. It covers the integration patterns merchants and banks choose between, the tokens and hardware security modules that keep card data out of your databases, the architecture of an instant-payment participant, cloud and residency choices under SAMA, NCA and PDPL rules, resilience and peak-day capacity, observability, and the delivery pipeline regulators expect — with fictional teams at real rails showing what goes right and wrong.الأنظمة خلف القواعد. يفتح هذا الفصل منصة دفع طبقةً طبقة — القنوات والبوابات والتنسيق والدفاتر والموصّلات — ويتتبع تفويضاً واحداً عبرها في مللي ثوانٍ. ويغطي أنماط التكامل التي يختار بينها التجار والبنوك، والرموز ووحدات الأمان العتادية التي تُبقي بيانات البطاقات خارج قواعد بياناتك، ومعمارية المشارك في الدفع الفوري، وخيارات السحابة والإقامة وفق قواعد ساما والهيئة الوطنية للأمن السيبراني ونظام حماية البيانات الشخصية، والمرونة وسعة أيام الذروة، والمراقبة، وخط التسليم الذي تتوقعه الجهات التنظيمية — مع فرق خيالية على أنظمة حقيقية تُظهر ما ينجح وما يفشل.
Learning objectivesأهداف التعلّم
By the end of this chapter you will be able to:بنهاية هذا الفصل ستكون قادراً على:
- Draw the reference architecture of a payment platform and place gateways, switches, processors, orchestrators and ledgers on it.رسم المعمارية المرجعية لمنصة دفع ووضع البوابات والمحوّلات والمعالجات والمنسّقين والدفاتر عليها.
- Choose an integration pattern (hosted page, SDK, direct API, host-to-host, file) and explain its PCI and latency consequences.اختيار نمط تكامل (صفحة مستضافة، حزمة تطوير، واجهة مباشرة، مضيف إلى مضيف، ملف) وشرح تبعاته على PCI وزمن الاستجابة.
- Design idempotent, event-driven payment flows that survive time-outs and retries.تصميم تدفقات دفع غير مكرِّرة وقائمة على الأحداث تصمد أمام انقضاء المهل وإعادة المحاولة.
- Explain acquirer, network and device tokens, and what an HSM does for PINs, cryptograms and keys.شرح رموز المستحوذ والشبكة والجهاز، وما تفعله وحدة الأمان العتادية للأرقام السرية والتشفير والمفاتيح.
- Describe the architecture of an instant-payment participant and its liquidity, time-out and 24×7 constraints.وصف معمارية المشارك في الدفع الفوري وقيود السيولة وانقضاء المهل والتشغيل 24×7.
- Make cloud, residency, resilience and capacity decisions that satisfy SAMA, the NCA and SDAIA.اتخاذ قرارات السحابة والإقامة والمرونة والسعة التي ترضي ساما والهيئة الوطنية للأمن السيبراني وسدايا.
- Instrument a platform so that approval rates, latency and errors are visible per rail, and run a delivery pipeline with regulatory gates.تجهيز المنصة بحيث تكون معدلات الموافقة وزمن الاستجابة والأخطاء مرئية لكل نظام، وتشغيل خط تسليم ببوابات تنظيمية.
Who this chapter is forلمن هذا الفصل
Developers get the patterns and the vocabulary of the rails they connect to. BAs and product managers learn which technical choice drives which business outcome — conversion, cost, compliance. Operations see what the dashboards should show and why incidents look the way they do. Compliance and risk learn what to ask for when a vendor says "we are PCI compliant and in the cloud".يحصل المطورون على الأنماط ومفردات الأنظمة التي يتصلون بها. ويتعلم المحللون ومديرو المنتجات أي خيار تقني يقود أي نتيجة أعمال — التحويل والتكلفة والامتثال. وترى العمليات ما ينبغي أن تعرضه لوحات المتابعة ولماذا تبدو الحوادث كما تبدو. ويتعلم الامتثال والمخاطر ما يجب طلبه عندما يقول مورد «نحن ممتثلون لـPCI وفي السحابة».
How to read this chapterكيف تقرأ هذا الفصل
Every diagram is a candidate for your own architecture review. When you meet a box you do not have, ask who owns that function for you — a vendor, a PSP, the scheme — and what you would see if it failed.كل مخطط مرشح لمراجعة معماريتك أنت. عندما تقابل مربعاً لا تملكه، اسأل من يتولى تلك الوظيفة نيابةً عنك — مورد أو مقدّم خدمة أو الشبكة — وماذا سترى إذا فشل.
A reference architecture for a payment platformمعمارية مرجعية لمنصة دفع
Reading the layersقراءة الطبقات
Channels create intent; the edge protects and de-duplicates; orchestration decides route, risk and authentication; core services own money and tokens; connectors speak each rail's dialect. Every real platform has all five, whether it is a bank, a PSP, a wallet or a merchant — the difference is which ones you build and which you rent.تنشئ القنوات النية؛ وتحمي الحافة وتزيل التكرار؛ ويقرر التنسيق المسار والمخاطر والمصادقة؛ وتملك الخدمات الأساسية المال والرموز؛ وتتحدث الموصّلات لهجة كل نظام. لكل منصة حقيقية الطبقات الخمس، سواء كانت بنكاً أو مقدّم خدمة أو محفظة أو تاجراً — والفرق أيها تبني وأيها تستأجر.
Where the region's names sitأين تقع أسماء المنطقة
- Connectors: Saudi Payments (mada, SARIE IPS, naqd), SADAD and Esal for bills and invoices, SARIE RTGS for settlement, GCCNet for Gulf card trafficالموصّلات: المدفوعات السعودية (مدى، سريع الفوري، نقد)، سداد وإيصال للفواتير، سريع للتسوية الإجمالية، والشبكة الخليجية لحركة بطاقات الخليج
- Orchestration / edge: PSPs and gateways — Geidea, HyperPay, Moyasar, Tap, PayTabs, neoleap, nearpay, Checkout.comالتنسيق / الحافة: مقدّمو الخدمة والبوابات — جيديا، هايبرباي، ميسر، تاب، بي تابس، نيوليب، نيرباي، تشيك آوت
- Core: bank core systems, wallet ledgers, processor platformsالأساسية: الأنظمة المصرفية الأساسية، دفاتر المحافظ، منصات المعالجة
The three questions of any reviewالأسئلة الثلاثة لأي مراجعة
- Where does card data (PAN) enter and where is it stored? (PCI scope)أين يدخل رقم البطاقة وأين يُخزَّن؟ (نطاق PCI)
- Where does money change hands versus where do we only record it? (ledger vs rail)أين ينتقل المال فعلاً مقابل أين نسجّله فقط؟ (الدفتر مقابل النظام)
- What happens on a time-out at each arrow? (idempotency, state)ماذا يحدث عند انقضاء المهلة عند كل سهم؟ (عدم التكرار، الحالة)
Gateways, switches, processors, cores: who runs whatالبوابات والمحوّلات والمعالجات والأنظمة الأساسية: من يشغّل ماذا
| Componentالمكوّن | What it doesما يفعله | Owned byيملكه | Regional examplesأمثلة إقليمية | Typical techالتقنية المعتادة |
|---|---|---|---|---|
| Payment gatewayبوابة الدفع | Captures payment data from a channel, secures it, forwards to the processor; hosted pages, SDKs, tokensتلتقط بيانات الدفع من القناة وتؤمّنها وتمرّرها إلى المعالج؛ صفحات مستضافة، حزم تطوير، رموز | PSP or acquirerمقدّم الخدمة أو المستحوذ | HyperPay, Moyasar, Tap, PayTabs, Geidea, Checkout.comهايبرباي، ميسر، تاب، بي تابس، جيديا، تشيك آوت | REST/JSON, JS SDKs, webhooks, 3DS serverREST/JSON، حزم JavaScript، إشعارات، خادم 3DS |
| Acquiring processorمعالج الاستحواذ | Runs the acquirer's host: terminal management, authorisation routing, clearing files, merchant settlementيشغّل مضيف المستحوذ: إدارة الطرفيات، توجيه التفويض، ملفات المقاصة، تسوية التجار | Acquirer or outsourced processorالمستحوذ أو معالج خارجي | Geidea, neoleap, in-house at Al Rajhi Bank and SNBجيديا، نيوليب، داخلي لدى مصرف الراجحي والبنك الأهلي السعودي | ISO 8583 hosts, HSMs, batch clearing, TMSمضيفات ISO 8583، وحدات أمان، مقاصة دفعية، إدارة الطرفيات |
| National switchالمحوّل الوطني | Routes domestic card transactions between acquirers and issuers; enforces scheme rules; nets positionsيوجّه معاملات البطاقات المحلية بين المستحوذين والمُصدرين؛ يفرض قواعد النظام؛ يحسب الصافي | Central bank or its operatorالبنك المركزي أو مشغّله | mada (Saudi Payments); GCCNet links the Gulf switchesمدى (المدفوعات السعودية)؛ وتربط الشبكة الخليجية محوّلات الخليج | ISO 8583 dialects, HSM key zones, settlement enginesلهجات ISO 8583، مناطق مفاتيح وحدات الأمان، محركات التسوية |
| Instant-payment infrastructureبنية الدفع الفوري | Real-time account-to-account clearing with proxy directory and RTGS settlementمقاصة فورية من حساب إلى حساب مع دليل أسماء مستعارة وتسوية في نظام التسوية الإجمالية | Central bank / operatorالبنك المركزي / المشغّل | SARIE IPS (Saudi Payments, 2021)سريع الفوري (المدفوعات السعودية، 2021) | ISO 20022 over APIs/MQ, 24×7 clustersISO 20022 عبر الواجهات / طوابير الرسائل، عناقيد 24×7 |
| Issuer processorمعالج الإصدار | Authorises on behalf of the issuer: card management, limits, fraud rules, tokens, statementsيفوّض نيابةً عن المُصدر: إدارة البطاقات، الحدود، قواعد الاحتيال، الرموز، الكشوف | Bank in-house or processorداخلي لدى البنك أو معالج | Bank platforms, regional and global processors, card-issuing APIs used by fintechsمنصات البنوك، معالجون إقليميون وعالميون، واجهات إصدار البطاقات التي تستخدمها شركات التقنية المالية | Auth engines, HSMs, ISO 8583/20022 adaptersمحركات التفويض، وحدات أمان، محوّلات ISO 8583/20022 |
| Core banking / wallet ledgerالنظام المصرفي الأساسي / دفتر المحفظة | System of record for balances and postingsنظام السجل للأرصدة والقيود | Bank / walletالبنك / المحفظة | Bank cores; wallet ledgers at STC Bank, urpay, Tweeq, Barqالأنظمة الأساسية للبنوك؛ دفاتر المحافظ لدى بنك STC وأورباي وتويق وبرق | Double-entry ledgers, event stores, batch + real-time postingدفاتر قيد مزدوج، مخازن أحداث، قيد دفعي وفوري |
| Orchestratorالمنسّق | Routes each payment to the best PSP/rail, retries, unifies tokens and reportingيوجّه كل دفعة إلى أفضل مقدّم خدمة / نظام، ويعيد المحاولة، ويوحّد الرموز والتقارير | Large merchants, marketplaces, PSPsالتجار الكبار، الأسواق الإلكترونية، مقدّمو الخدمة | In-house at large platforms; orchestration vendorsداخلي لدى المنصات الكبيرة؛ موردو التنسيق | Rules engines, multi-PSP adapters, vaultsمحركات قواعد، محوّلات متعددة مقدّمي الخدمة، خزائن |
The same company often wears several hats: a bank is issuer, acquirer and instant-payment participant; a PSP is gateway, orchestrator and sometimes acquirer. Name the function, not the company, when you design.كثيراً ما ترتدي الشركة نفسها عدة قبعات: البنك مُصدر ومستحوذ ومشارك في الدفع الفوري؛ ومقدّم الخدمة بوابة ومنسّق وأحياناً مستحوذ. سمِّ الوظيفة لا الشركة عندما تصمم.
One authorisation through the stack, in millisecondsتفويض واحد عبر الطبقات، في مللي ثوانٍ
What each hop actually doesما تفعله كل قفزة فعلاً
- Terminal: EMV kernel builds the cryptogram (ARQC) from chip, amount and unpredictable number; encrypts the PIN block.الطرفية: تبني نواة EMV التشفير (ARQC) من الشريحة والمبلغ والرقم غير المتوقع؛ وتشفّر كتلة الرقم السري.
- Acquirer host: validates, translates PIN block to the scheme zone key, applies velocity checks, formats ISO 8583.مضيف المستحوذ: يتحقق ويترجم كتلة الرقم السري إلى مفتاح منطقة الشبكة ويطبّق فحوص السرعة وينسّق ISO 8583.
- Switch: BIN routing, rule checks, stand-in if the issuer is down.المحوّل: التوجيه بحسب BIN، فحص القواعد، المعالجة البديلة إذا كان المُصدر متوقفاً.
- Issuer: HSM verifies ARQC and PIN; auth engine checks status, limits, fraud score; posts a hold.المُصدر: تتحقق وحدة الأمان من ARQC والرقم السري؛ ويفحص محرك التفويض الحالة والحدود وتقييم الاحتيال؛ ويقيّد حجزاً.
Failure modes you will meetأعطال ستقابلها
- Issuer time-out → switch stand-in approves within limits or declines (response code 91)انقضاء مهلة المُصدر ← يوافق المحوّل بديلاً ضمن الحدود أو يرفض (رمز الرد 91)
- Key mismatch after HSM rotation → every PIN fails (code 55) for one acquirerعدم تطابق المفاتيح بعد تدوير وحدة الأمان ← يفشل كل رقم سري (الرمز 55) لمستحوذ واحد
- Duplicate 0100 after a network retry → issuer must detect by STAN + RRNطلب 0100 مكرر بعد إعادة محاولة الشبكة ← يجب على المُصدر اكتشافه بـSTAN + RRN
- Reversal (0420) never arrives → hold stays on the customer's account for daysلا يصل الإلغاء (0420) ← يبقى الحجز على حساب العميل لأيام
Why it matters to non-developersلماذا يهم غير المطورين
Every decline reason your customer sees, every "pending" that lingers and every dispute that starts with "I was charged twice" is born on one of these arrows. Product and operations should be able to say which one.كل سبب رفض يراه عميلك، وكل «معلّق» يطول، وكل نزاع يبدأ بـ«خُصم مني مرتين» يولد على أحد هذه الأسهم. وينبغي أن يستطيع المنتج والعمليات تحديد أيها.
Payment APIs: contracts, webhooks and idempotencyواجهات الدفع: العقود والإشعارات وعدم التكرار
The API contractعقد الواجهة
- Resources:
payments,refunds,customers,tokens,payouts; states as a documented machineالموارد:payments،refunds،customers،tokens،payouts؛ والحالات كآلة موثقة - Amounts as minor units or decimal strings with ISO currency — never floatsالمبالغ بالوحدات الصغرى أو سلاسل عشرية مع رمز العملة — لا أرقاماً عشرية عائمة أبداً
- Versioning in the path or header; deprecation calendar; change logالإصدارات في المسار أو الترويسة؛ تقويم الإيقاف؛ سجل التغييرات
- Errors: machine code + rail reason code verbatim + human message in Arabic and Englishالأخطاء: رمز آلي + رمز سبب النظام حرفياً + رسالة بشرية بالعربية والإنجليزية
Webhooks done rightالإشعارات بشكل صحيح
- Signed (HMAC) with a rotating secret; timestamped to defeat replayموقّعة (HMAC) بسر متجدد؛ مختومة زمنياً لمنع إعادة الإرسال
- At-least-once with exponential back-off for 24–72 h; the receiver de-duplicates by event idمرة على الأقل مع تراجع أسي لمدة 24–72 ساعة؛ والمستقبِل يزيل التكرار بمعرّف الحدث
- Never trust the webhook body for money: fetch the payment by id and act on its stateلا تثق بمحتوى الإشعار للمال: اجلب الدفعة بمعرّفها وتصرف بحسب حالتها
- Replay tool in the dashboard for missed eventsأداة إعادة إرسال في لوحة التحكم للأحداث الفائتة
Idempotency rulesقواعد عدم التكرار
- Client generates a UUID per intent, not per attempt; stores it before the first callيولّد العميل UUID لكل نية لا لكل محاولة؛ ويخزّنه قبل الاستدعاء الأول
- Server stores key → response ≥ 24 h; same key + different body = 422يخزّن الخادم المفتاح ← الرد ≥ 24 ساعة؛ والمفتاح نفسه مع محتوى مختلف = 422
- Map the key to the rail identifiers (EndToEndId, RRN) so ops can trace across hopsاربط المفتاح بمعرّفات النظام (EndToEndId، RRN) ليتمكن التشغيل من التتبع عبر القفزات
- Time-out ≠ failure: query before you retry with a new keyانقضاء المهلة ≠ فشل: استعلم قبل إعادة المحاولة بمفتاح جديد
Integration patterns and what they cost youأنماط التكامل وما تكلّفك
| Patternالنمط | How it worksكيف يعمل | PCI scopeنطاق PCI | Control / UXالتحكم / التجربة | Best forالأنسب لـ | Watch outانتبه |
|---|---|---|---|---|---|
| Hosted payment pageصفحة دفع مستضافة | Redirect to the PSP's page; return with a resultإعادة توجيه إلى صفحة مقدّم الخدمة؛ العودة بالنتيجة | Minimal (SAQ A)أدنى (SAQ A) | Low; branding limitedمنخفض؛ تخصيص محدود | Small merchants, fast launchالتجار الصغار، الإطلاق السريع | Redirect drop-off on mobile; return-URL handlingتسرب عند إعادة التوجيه على الجوال؛ معالجة رابط العودة |
| Drop-in / hosted fields (JS SDK)حقول مضمّنة / حزمة JavaScript | PSP iframe fields inside your page; you receive a tokenحقول iframe من مقدّم الخدمة داخل صفحتك؛ تتلقى رمزاً | Low (SAQ A / A-EP)منخفض (SAQ A / A-EP) | High; native lookعالٍ؛ مظهر أصلي | Most e-commerce and appsمعظم التجارة الإلكترونية والتطبيقات | Script integrity, CSP, 3DS challenge flowsسلامة السكربتات، سياسة أمان المحتوى، تدفقات تحدي 3DS |
| Direct API (PAN touches your server)واجهة مباشرة (رقم البطاقة يمر بخادمك) | Your servers post card data to the PSPتُرسل خوادمك بيانات البطاقة إلى مقدّم الخدمة | Full (SAQ D / RoC)كامل (SAQ D / تقرير امتثال) | Totalكامل | PSPs, large platforms with a vaultمقدّمو الخدمة، المنصات الكبيرة ذات الخزنة | Annual audits, HSMs, key custodyتدقيقات سنوية، وحدات أمان، حراسة المفاتيح |
| Mobile SDK + walletsحزمة الجوال + المحافظ | Native SDK with Apple Pay / Google Pay / mada Pay sheetsحزمة أصلية مع صفحات آبل باي / جوجل باي / مدى باي | Lowمنخفض | High; best conversionعالٍ؛ أفضل تحويل | Apps in the Kingdom, where Apple Pay and mada Pay dominateالتطبيقات في المملكة حيث تهيمن آبل باي ومدى باي | Merchant certificates, domain verification, token lifecycleشهادات التاجر، التحقق من النطاق، دورة حياة الرموز |
| Host-to-host (ISO 8583 / 20022)مضيف إلى مضيف (ISO 8583 / 20022) | Persistent connections to a switch or rail; messages, not RESTاتصالات دائمة بمحوّل أو نظام؛ رسائل لا REST | Fullكامل | Total; lowest latencyكامل؛ أقل زمن استجابة | Banks, acquirers, IPS participantsالبنوك، المستحوذون، مشاركو الدفع الفوري | Certification cycles, key exchange ceremonies, 24×7 opsدورات الاعتماد، مراسم تبادل المفاتيح، تشغيل 24×7 |
| File-based (SFTP batch)قائم على الملفات (SFTP دفعي) | Payroll (Mudad wage files), bulk payouts, settlement and recon filesالرواتب (ملفات أجور مُدد)، الدفعات الجماعية، ملفات التسوية والمطابقة | Depends on contentبحسب المحتوى | Low; cut-off drivenمنخفض؛ محكوم بأوقات الإقفال | Corporates, payroll, back-officeالشركات، الرواتب، المكاتب الخلفية | Encryption at rest, checksum, duplicate-file detectionالتشفير أثناء التخزين، المجموع الاختباري، اكتشاف الملفات المكررة |
| Open-banking APIsواجهات المصرفية المفتوحة | Consent-based account access and payment initiation via the national platformوصول إلى الحسابات وبدء دفع بالموافقة عبر المنصة الوطنية | None (no cards)لا شيء (لا بطاقات) | Medium; bank-app redirectمتوسط؛ إعادة توجيه إلى تطبيق البنك | Account-to-account checkout, PFMالدفع من حساب إلى حساب، إدارة الأموال الشخصية | Licence, FAPI security profile, consent UXالترخيص، ملف أمان FAPI، تجربة الموافقة |
Case 1 — Sahel Foods rebuilds checkout on mada, Apple Pay and 3DSالحالة 1 — سهل فودز تعيد بناء الدفع على مدى وآبل باي و3DS
Merchant integration choices · Saudi Arabiaخيارات تكامل التاجر · السعودية
Participants: Sahel Foods (fictional Riyadh online grocer, 40k orders/month) · a SAMA-licensed PSP · mada, Visa/Mastercard, Apple Pay · a 3DS serverالمشاركون: سهل فودز (بقّالة إلكترونية خيالية في الرياض، 40 ألف طلب شهرياً) · مقدّم خدمة مرخّص من ساما · مدى، فيزا/ماستركارد، آبل باي · خادم 3DS- Pattern. Move to the PSP's hosted fields + native Apple Pay sheet. PAN never touches Sahel's servers; PCI drops toward SAQ A-EP; the Apple Pay button alone lifts mobile conversion.النمط. الانتقال إلى الحقول المستضافة لمقدّم الخدمة + صفحة آبل باي الأصلية. لا يلمس رقم البطاقة خوادم سهل؛ ينخفض PCI نحو SAQ A-EP؛ ويرفع زر آبل باي وحده تحويل الجوال.
- Routing. mada-range cards must go to mada (domestic debit rule); the PSP's BIN lookup decides; co-badged cards default to mada in-Kingdom.التوجيه. يجب أن تذهب بطاقات نطاق مدى إلى مدى (قاعدة الخصم المحلي)؛ يقرر البحث بـBIN لدى مقدّم الخدمة؛ والبطاقات ثنائية العلامة تذهب افتراضياً إلى مدى داخل المملكة.
- 3DS. EMV 3DS 2 on every card payment; frictionless when the issuer's risk engine allows, challenge (OTP / app approval) otherwise; the challenge iframe is handled by the SDK, not by Sahel.3DS. EMV 3DS 2 في كل دفعة بطاقة؛ سلس عندما يسمح محرك مخاطر المُصدر، وتحدٍّ (رمز لمرة واحدة / موافقة في التطبيق) خلاف ذلك؛ وتتولى الحزمة إطار التحدي لا سهل.
- Idempotency. The app creates a payment intent with a UUID before showing the sheet; retries reuse it; the "charged twice" complaints stop.عدم التكرار. ينشئ التطبيق نية دفع بـUUID قبل عرض الصفحة؛ وتعيد المحاولات استخدامه؛ فتتوقف شكاوى «خُصم مني مرتين».
- Webhooks. Order fulfilment moves from "the app said success" to "the webhook + GET /payments/{id} says captured".الإشعارات. ينتقل تنفيذ الطلب من «قال التطبيق نجاح» إلى «الإشعار + GET /payments/{id} يقول مُحصَّل».
Results after one quarter (illustrative)النتائج بعد ربع سنة (توضيحية)
What each role takes awayما يستخلصه كل دور
- Dev: the intent-then-confirm model with a client UUID is the single most valuable pattern in this chapter.المطور: نموذج النية ثم التأكيد بـUUID من العميل هو أثمن نمط في هذا الفصل.
- Product: the wallet button is a conversion feature and a PCI feature at once.المنتج: زر المحفظة ميزة تحويل وميزة PCI في آن واحد.
- Ops: reconcile PSP settlement files to the order ledger by payment id, not by amount and date.العمليات: طابق ملفات تسوية مقدّم الخدمة مع دفتر الطلبات بمعرّف الدفعة لا بالمبلغ والتاريخ.
- Risk: mada routing and 3DS coverage are scheme obligations — check them in the go-live sign-off.المخاطر: توجيه مدى وتغطية 3DS التزامات من الشبكة — تحقق منهما في اعتماد الإطلاق.
Event-driven payments: outbox, queues, exactly-onceالمدفوعات القائمة على الأحداث: الصندوق الصادر والطوابير و«مرة واحدة بالضبط»
Why payments are event-shapedلماذا المدفوعات أحداث بطبيعتها
A payment is a sequence of facts that arrive at different times from different systems: authorised now, captured tonight, settled in two days, disputed in a month. Modelling it as events with a state machine, rather than as one row you keep overwriting, is what makes reconciliation and audit possible.الدفعة تسلسل حقائق تصل في أوقات مختلفة من أنظمة مختلفة: تفويض الآن، وتحصيل الليلة، وتسوية بعد يومين، ونزاع بعد شهر. ونمذجتها كأحداث مع آلة حالات، لا كصف واحد تعيد كتابته، هو ما يجعل المطابقة والتدقيق ممكنين.
Patternsالأنماط
- Transactional outbox — event and state in one commit; relay publishesالصندوق الصادر المعاملاتي — الحدث والحالة في التزام واحد؛ والمرحّل ينشر
- Idempotent consumers — dedup table keyed by event idمستهلكون غير مكرِّرين — جدول إزالة تكرار بمفتاح معرّف الحدث
- Saga / process manager — multi-step flows (auth → capture → payout) with compensationsالساغا / مدير العملية — تدفقات متعددة الخطوات (تفويض ← تحصيل ← صرف) مع تعويضات
- Dead-letter queue with an ops UI — every poisoned message is a customer waitingطابور الرسائل المتعذرة بواجهة تشغيل — كل رسالة معطوبة عميل ينتظر
There is no exactly-onceلا يوجد «مرة واحدة بالضبط»
Networks deliver at-least-once or at-most-once. "Exactly once" is an end-to-end property you build from at-least-once delivery plus idempotent handling with a stable key — the same lesson as the Idempotency-Key on the previous slide, and the same as the STAN/RRN check in ISO 8583.تسلّم الشبكات مرة على الأقل أو مرة على الأكثر. و«مرة واحدة بالضبط» خاصية من طرف إلى طرف تبنيها من التسليم مرة على الأقل مع معالجة غير مكرِّرة بمفتاح ثابت — الدرس نفسه كمفتاح عدم التكرار في الشريحة السابقة، ونفسه كفحص STAN/RRN في ISO 8583.
Inside an instant-payment participantداخل مشارك في الدفع الفوري
Constraints the rail imposesالقيود التي يفرضها النظام
- Respond to an incoming pacs.008 within seconds (scheme SLA) — including sanctions, fraud and postingالرد على pacs.008 وارد خلال ثوانٍ (اتفاقية النظام) — بما فيه العقوبات والاحتيال والقيد
- 24×7×365: no nightly batch window, no "maintenance Friday"24×7×365: لا نافذة دفعية ليلية ولا «صيانة يوم الجمعة»
- Prefunded / net settlement position must never go negative — liquidity monitoring is part of the appيجب ألا يصبح المركز الممول مسبقاً / الصافي سالباً — مراقبة السيولة جزء من التطبيق
- Availability targets and incident reporting to the operatorأهداف التوافر والإبلاغ عن الحوادث إلى المشغّل
The state machineآلة الحالات
RECEIVED → SCREENED → RESERVED → SENT → (ACSC | RJCT | TIMEOUT) → POSTED | RELEASED | INVESTIGATE. Every transition is persisted with the rail's identifiers before the next call is made. A TIMEOUT is not a failure: query the status (pacs.028 / API) before releasing funds or retrying.RECEIVED → SCREENED → RESERVED → SENT → (ACSC | RJCT | TIMEOUT) → POSTED | RELEASED | INVESTIGATE. كل انتقال يُحفظ مع معرّفات النظام قبل الاستدعاء التالي. وانقضاء المهلة ليس فشلاً: استعلم عن الحالة (pacs.028 / الواجهة) قبل تحرير الأموال أو إعادة المحاولة.
Region notesملاحظات إقليمية
- SARIE IPS (Saudi Payments, 2021): banks and licensed non-bank PSPs participate; alias directory on mobile number, ID number and email; request-to-pay — all ISO 20022سريع الفوري (المدفوعات السعودية، 2021): تشارك البنوك ومقدّمو الخدمة المرخّصون من غير البنوك؛ دليل الأسماء المستعارة برقم الجوال ورقم الهوية والبريد؛ وطلب الدفع — كله ISO 20022
- Settlement rides the participants' SARIE RTGS positions; per-transfer and daily limits come from SAMA and the participant guide — read it, not folkloreتُسوّى عبر مراكز المشاركين في سريع للتسوية الإجمالية؛ وتأتي حدود التحويل واليوم من ساما ودليل المشارك — اقرأه لا الشائع
- Peak load lands on salary days around the 27th (Mudad payroll runs) and Ramadan evenings — size and test for those hoursيقع ذروة الحمل في أيام الرواتب حول يوم 27 (دورات رواتب مُدد) وأمسيات رمضان — حدد السعة واختبر لتلك الساعات
Case 2 — Bank Al Nakheel and the SARIE IPS time-out that posted twiceالحالة 2 — بنك النخيل وانقضاء مهلة سريع الفوري الذي قُيّد مرتين
Unknown state in an instant-payment participant · Saudi Arabiaالحالة المجهولة لدى مشارك في الدفع الفوري · السعودية
Participants: Bank Al Nakheel (fictional SAMA-licensed bank, Riyadh) · SARIE IPS (Saudi Payments) · a customer paying rent · the bank's payments engineering and operations teamsالمشاركون: بنك النخيل (بنك خيالي مرخّص من ساما، الرياض) · سريع الفوري (المدفوعات السعودية) · عميل يدفع إيجاراً · فريقا هندسة المدفوعات والعمليات في البنك- What actually happened. The first pacs.008 reached SARIE IPS and was settled (ACSC); the pacs.002 was delayed by a queue backlog on the bank side and arrived at 21:41 — after the adapter had already declared failure.ما حدث فعلاً. وصل pacs.008 الأول إلى سريع الفوري وسُوّي (ACSC)؛ وتأخر pacs.002 بسبب تراكم في طابور لدى البنك ووصل 21:41 — بعد أن أعلن المحوّل الفشل بالفعل.
- The design flaw. TIMEOUT was mapped to FAILED. In an instant rail, a time-out means unknown: the money may have moved.عيب التصميم. رُبط انقضاء المهلة بالفشل. وفي النظام الفوري يعني انقضاء المهلة مجهول: ربما تحرك المال.
- The fix. New state INVESTIGATE: keep the reservation, query status (pacs.028 / operator API), reconcile against the late pacs.002, and only then release or post. The app shows "processing — we will confirm within minutes".الإصلاح. حالة جديدة INVESTIGATE: إبقاء الحجز، والاستعلام عن الحالة (pacs.028 / واجهة المشغّل)، والمطابقة مع pacs.002 المتأخر، ثم التحرير أو القيد. ويعرض التطبيق «قيد المعالجة — سنؤكد خلال دقائق».
- The cleanup. Operations raise a return request (camt.056) for the duplicate; the landlord's bank returns it (pacs.004). Incident reported to Saudi Payments per the participant rules.التنظيف. تقدّم العمليات طلب إرجاع (camt.056) للمكرر؛ ويعيده بنك المالك (pacs.004). ويُبلَّغ عن الحادث إلى المدفوعات السعودية وفق قواعد المشاركين.
Engineering rules that came out of itقواعد هندسية نتجت عنه
- Three outcomes, not two: success, failure, unknown. Unknown gets its own state, its own SLA and its own dashboard tile.ثلاث نتائج لا اثنتان: نجاح، فشل، مجهول. وللمجهول حالته الخاصة واتفاقيته الخاصة وبلاطة لوحة المتابعة الخاصة.
- Never release a reservation on a time-out; release only on a confirmed RJCT or a reconciled absence.لا تحرر حجزاً أبداً عند انقضاء المهلة؛ حرره فقط عند رفض مؤكد أو غياب مطابَق.
- The customer-facing "retry" button is disabled while any transfer to the same alias is in INVESTIGATE.يُعطَّل زر «إعادة المحاولة» للعميل ما دام أي تحويل إلى الاسم المستعار نفسه في حالة INVESTIGATE.
- Queue depth on the inbound pacs.002 listener is an alert, not a log line.عمق الطابور في مستمع pacs.002 الوارد تنبيه لا سطر سجل.
What each role takes awayما يستخلصه كل دور
- Product: "processing" is an honest state; "failed" is a promise you may be breaking.المنتج: «قيد المعالجة» حالة صادقة؛ و«فشل» وعد قد تخلفه.
- Ops: the duplicate was found by the landlord, not by reconciliation — recon must run intraday on instant rails.العمليات: اكتشف المالك المكرر لا المطابقة — يجب أن تعمل المطابقة خلال اليوم على الأنظمة الفورية.
- Risk: an unknown-state design is a consumer-protection issue as much as an engineering one.المخاطر: تصميم الحالة المجهولة مسألة حماية مستهلك بقدر ما هو مسألة هندسية.
Tokenisation: three kinds of tokenالترميز: ثلاثة أنواع من الرموز
Why tokensلماذا الرموز
A stolen token is useless outside its scope; a stolen PAN works everywhere. Tokens shrink PCI scope, survive card reissue (network tokens update automatically), and carry a per-transaction cryptogram that makes replay impossible. In the region, mada, Visa and Mastercard all run token services, and Apple Pay / Google Pay / mada Pay / Samsung Pay ride on them.الرمز المسروق عديم الفائدة خارج نطاقه؛ ورقم البطاقة المسروق يعمل في كل مكان. تقلّص الرموز نطاق PCI، وتصمد أمام إعادة إصدار البطاقة (تتحدث رموز الشبكة تلقائياً)، وتحمل تشفيراً لكل معاملة يجعل إعادة الإرسال مستحيلة. وفي المنطقة تشغّل مدى وفيزا وماستركارد خدمات رموز، وتعمل عليها آبل باي وجوجل باي ومدى باي وسامسونج باي.
Decisions for a product teamقرارات لفريق المنتج
- Card-on-file: PSP token (simple) or network token (higher approval rates, lifecycle updates)?البطاقة المحفوظة: رمز مقدّم الخدمة (بسيط) أم رمز الشبكة (معدلات موافقة أعلى، تحديثات دورة الحياة)؟
- Multi-PSP: who owns the vault? Portability of tokens is a lock-in question.تعدد مقدّمي الخدمة: من يملك الخزنة؟ قابلية نقل الرموز مسألة احتكار.
- Wallet provisioning: issuer ID&V rules (green / yellow / red path) decide friction and fraud.تزويد المحافظ: قواعد التحقق من الهوية لدى المُصدر (المسار الأخضر / الأصفر / الأحمر) تحدد الاحتكاك والاحتيال.
Developer notesملاحظات للمطورين
- Store token + last 4 + expiry + brand; never PAN, never CVV (not even encrypted)خزّن الرمز + آخر 4 أرقام + الانتهاء + العلامة؛ لا رقم البطاقة ولا CVV أبداً (ولا حتى مشفّراً)
- Format-preserving tokens look like PANs — mask them in logs anywayالرموز الحافظة للتنسيق تشبه أرقام البطاقات — أخفها في السجلات على أي حال
- Cryptogram validity is single-use and short-lived; do not cache wallet payloadsصلاحية التشفير لاستخدام واحد وقصيرة؛ لا تخزّن حمولات المحافظ مؤقتاً
Cryptography in payments: HSMs, keys and PIN translationالتشفير في المدفوعات: وحدات الأمان والمفاتيح وترجمة الرقم السري
Ceremonies and custodyالمراسم والحراسة
Master keys are created and exchanged in key ceremonies: components held by different custodians, entered under dual control, logged and witnessed. Joining mada, GCCNet or a scheme involves exactly this — and it is why "just connect us to the switch" takes weeks.تُنشأ المفاتيح الرئيسية وتُتبادل في مراسم مفاتيح: مكوّنات يحملها حرّاس مختلفون، تُدخل تحت رقابة مزدوجة، وتُسجَّل ويُشهد عليها. والانضمام إلى مدى أو الشبكة الخليجية أو شبكة يتضمن هذا بالضبط — ولهذا يستغرق «فقط أوصلونا بالمحوّل» أسابيع.
Asymmetric sideالجانب غير المتماثل
- TLS / mTLS between hosts; certificates from the rail's PKI (open-banking trust frameworks, IPS)TLS / mTLS بين المضيفات؛ شهادات من البنية التحتية للمفاتيح العامة للنظام (أطر ثقة المصرفية المفتوحة، الدفع الفوري)
- EMV offline data authentication (SDA/DDA/CDA) uses issuer and scheme RSA/ECC keysتستخدم مصادقة بيانات EMV دون اتصال (SDA/DDA/CDA) مفاتيح RSA/ECC للمُصدر والشبكة
- Webhook and API request signing (HMAC or JWS)توقيع طلبات الإشعارات والواجهات (HMAC أو JWS)
- Key rotation is a product feature with a calendar, not an emergencyتدوير المفاتيح ميزة منتج بتقويم لا حالة طوارئ
Questions to ask a vendorأسئلة تطرحها على مورد
- Which HSM, which certification (PCI HSM / FIPS 140-3), where physically?أي وحدة أمان، وأي اعتماد (PCI HSM / FIPS 140-3)، وأين مادياً؟
- Who holds key components; how is dual control evidenced?من يحمل مكوّنات المفاتيح؛ وكيف تُثبت الرقابة المزدوجة؟
- Can keys be exported? (The right answer is no.)هل يمكن تصدير المفاتيح؟ (الجواب الصحيح لا.)
- How does a cloud HSM satisfy in-country residency rules?كيف تستوفي وحدة الأمان السحابية قواعد الإقامة داخل البلد؟
Authentication technology: 3-D Secure 2, digital identity, passkeysتقنيات المصادقة: 3-D Secure 2 والهوية الرقمية ومفاتيح المرور
| Technologyالتقنية | How it worksكيف تعمل | Where you meet itأين تقابلها |
|---|---|---|
| EMV 3-D Secure 2 | Merchant's 3DS server sends 100+ data points to the issuer's ACS via the directory server; issuer answers frictionless or challenge; liability shifts to the issuer on successيرسل خادم 3DS للتاجر أكثر من 100 نقطة بيانات إلى خادم التحكم لدى المُصدر عبر خادم الدليل؛ يرد المُصدر بسلاسة أو تحدٍّ؛ وتنتقل المسؤولية إلى المُصدر عند النجاح | Every online card payment in the Kingdom — SAMA mandates 3DS on e-commerceكل دفعة بطاقة إلكترونية في المملكة — تُلزم ساما بـ3DS في التجارة الإلكترونية |
| National digital identityالهوية الرقمية الوطنية | Government-run identity: Nafath single sign-on, with Absher services and Yakeen data verification behind itهوية تديرها الحكومة: النفاذ الوطني الموحد، ومن خلفه خدمات أبشر والتحقق من البيانات عبر يقين | Onboarding (eKYC), high-risk step-up, open-banking consentالتسجيل (اعرف عميلك إلكترونياً)، التصعيد عالي المخاطر، موافقة المصرفية المفتوحة |
| Device binding + biometricsربط الجهاز + القياسات الحيوية | Keys generated in the device's secure enclave; biometric unlocks the key; server verifies a signatureتُولَّد المفاتيح في الجيب الآمن للجهاز؛ تفتح القياسات الحيوية المفتاح؛ ويتحقق الخادم من التوقيع | Bank and wallet apps; in-app 3DS challenge approvalتطبيقات البنوك والمحافظ؛ الموافقة على تحدي 3DS داخل التطبيق |
| Passkeys / FIDO2مفاتيح المرور / FIDO2 | Phishing-resistant public-key login synced across devicesتسجيل دخول مقاوم للتصيد بمفتاح عام متزامن عبر الأجهزة | Replacing SMS OTP where regulators allow; merchant accountsيحل محل رموز SMS حيث تسمح الجهات التنظيمية؛ حسابات التجار |
| SMS OTPرمز SMS لمرة واحدة | Shared secret over the telco networkسر مشترك عبر شبكة الاتصالات | Still the default 3DS challenge for many Saudi issuers — and the top target of social-engineering fraud (Chapter 08)لا يزال تحدي 3DS الافتراضي لدى كثير من المُصدرين السعوديين — والهدف الأول لاحتيال الهندسة الاجتماعية (الفصل 08) |
Designing the step-upتصميم التصعيد
- Risk-based: low-value, known device, known merchant → frictionless; anything else → challenge.قائم على المخاطر: قيمة منخفضة وجهاز معروف وتاجر معروف ← سلس؛ وأي شيء آخر ← تحدٍّ.
- Prefer in-app approval (push + biometric) over SMS; it is both safer and faster.فضّل الموافقة داخل التطبيق (إشعار + قياسات حيوية) على SMS؛ فهي أأمن وأسرع معاً.
- Measure challenge rate, challenge success rate and abandonment per issuer — the numbers differ wildly.قِس معدل التحدي ونجاح التحدي والتخلي لكل مُصدر — فالأرقام تختلف كثيراً.
- Exemptions (low value, trusted beneficiary, recurring) exist in scheme rules; use them deliberately, log the reason.توجد إعفاءات (قيمة منخفضة، مستفيد موثوق، متكرر) في قواعد الشبكات؛ استخدمها عمداً وسجّل السبب.
Authentication is where security, conversion and regulation collide. A 3DS challenge that fails 15 % of the time is a revenue problem for the merchant, a complaint problem for the issuer and a fraud-displacement problem for everyone.المصادقة هي حيث يصطدم الأمن والتحويل والتنظيم. تحدي 3DS يفشل 15% من الوقت مشكلة إيراد للتاجر ومشكلة شكاوى للمُصدر ومشكلة انتقال احتيال للجميع.
Case 3 — Khuyut: mada, Apple Pay and BNPL on one Moyasar checkoutالحالة 3 — خيوط: مدى وآبل باي والدفع الآجل على دفع ميسر واحد
Multi-method checkout in a COD-heavy segment · Saudi Arabiaدفع متعدد الطرق في شريحة يهيمن عليها الدفع عند الاستلام · السعودية
Participants: Khuyut (fictional Jeddah abaya and fashion brand selling on Instagram and its own site) · Moyasar (PSP) · mada, Visa/Mastercard, Apple Pay · Tabby and Tamara (BNPL) · STC Bank and urpay walletsالمشاركون: خيوط (علامة عبايات وأزياء خيالية في جدة تبيع عبر إنستغرام وموقعها) · ميسر (مقدّم الخدمة) · مدى، فيزا/ماستركارد، آبل باي · تابي وتمارا (الدفع الآجل) · محفظتا بنك STC وأورباي- One integration, many methods. Moyasar's checkout exposes cards (mada + international), the Apple Pay sheet, STC Bank / urpay wallet pay, and Tabby / Tamara BNPL — through one API and one webhook format.تكامل واحد، طرق كثيرة. يوفّر دفع ميسر البطاقات (مدى + الدولية)، وصفحة آبل باي، والدفع بمحفظتي بنك STC وأورباي، والدفع الآجل عبر تابي وتمارا — عبر واجهة واحدة وصيغة إشعار واحدة.
- Cards. 3DS 2 challenge is OTP or in-app approval; mada debit dominates online, so the dev surfaces the issuer's decline reason in Arabic instead of a generic "declined".البطاقات. تحدي 3DS 2 رمز لمرة واحدة أو موافقة داخل التطبيق؛ ويهيمن خصم مدى على الإنترنت — فيعرض المطور سبب رفض المُصدر بالعربية بدل «مرفوض» العام.
- Wallets and BNPL. Wallet and BNPL approvals are asynchronous: the order waits for the callback, with a 10-minute expiry and a "resend request" button; a Tabby decline falls back to the card form.المحافظ والدفع الآجل. موافقات المحافظ والدفع الآجل غير متزامنة: ينتظر الطلب الرد، مع انتهاء بعد 10 دقائق وزر «إعادة إرسال الطلب»؛ ويعود رفض تابي إلى نموذج البطاقة.
- Incentive. Prepaid orders get a 5 % discount funded by the saved COD failures; the choice is shown as a default, not a nag.الحافز. تحصل الطلبات المدفوعة مسبقاً على خصم 5% تموّله إخفاقات الدفع عند الاستلام الموفَّرة؛ ويُعرض الخيار افتراضياً لا إلحاحاً.
After three months (illustrative)بعد ثلاثة أشهر (توضيحية)
What each role takes awayما يستخلصه كل دور
- Product: in the Kingdom the method mix — mada, Apple Pay, BNPL — is the product decision; the raw card form is a minority of prepaid.المنتج: في المملكة مزيج الطرق — مدى وآبل باي والدفع الآجل — هو قرار المنتج؛ ونموذج البطاقة الخام أقلية من المدفوع مسبقاً.
- Dev: asynchronous methods need an order state machine and expiry handling from day one.المطور: تحتاج الطرق غير المتزامنة إلى آلة حالات للطلبات ومعالجة للانتهاء منذ اليوم الأول.
- Ops: wallets, cards and BNPL settle on different cycles — three recon streams, one ledger.العمليات: تُسوّى المحافظ والبطاقات والدفع الآجل بدورات مختلفة — ثلاثة تدفقات مطابقة ودفتر واحد.
- Risk: the PSP holds PCI scope; the merchant still owns fraud on COD-to-prepaid switchers.المخاطر: يحمل مقدّم الخدمة نطاق PCI؛ ولا يزال التاجر يملك الاحتيال لدى المتحولين من الدفع عند الاستلام.
Cloud, residency and what stays on the floorالسحابة والإقامة وما يبقى في مقرّك
| Rule setمجموعة القواعد | What it requires (summary)ما تشترطه (ملخص) | What it means for your designما يعنيه لتصميمك |
|---|---|---|
| SAMA cloud & outsourcingالسحابة والإسناد الخارجي لدى ساما | Non-objection before material workloads move; data classification; in-Kingdom hosting expected for core systems and payment data; exit plans and audit rights in the contractعدم ممانعة قبل نقل الأعمال الجوهرية؛ تصنيف البيانات؛ يُتوقع الاستضافة داخل المملكة للأنظمة الأساسية وبيانات الدفع؛ خطط خروج وحقوق تدقيق في العقد | File the non-objection early; classify every data set before choosing where it runs; keep the regulator letter in the evidence packقدّم طلب عدم الممانعة مبكراً؛ صنّف كل مجموعة بيانات قبل اختيار مكان تشغيلها؛ واحتفظ بخطاب الجهة التنظيمية في حزمة الأدلة |
| NCA controls (ECC, CCC)ضوابط الهيئة الوطنية (الضوابط الأساسية والسحابية) | Essential Cybersecurity Controls (updated 2024) as the baseline; Cloud Cybersecurity Controls for providers and tenants of regulated workloadsالضوابط الأساسية للأمن السيبراني (محدّثة 2024) أساساً؛ وضوابط الأمن السيبراني للحوسبة السحابية للمزودين ومستأجري الأعمال المنظَّمة | Pick a provider that evidences CCC compliance; map your controls to ECC once and reuse the mapping in every reviewاختر مزوداً يثبت الامتثال للضوابط السحابية؛ وواءم ضوابطك مع الضوابط الأساسية مرة واحدة وأعد استخدام المواءمة في كل مراجعة |
| PDPL & SDAIA transfer rulesنظام حماية البيانات وقواعد النقل لدى سدايا | Personal data leaves the Kingdom only under the 2024 transfer regulations (adequacy, safeguards, necessity); breach notification to SDAIA within 72 hoursلا تغادر البيانات الشخصية المملكة إلا وفق لوائح النقل 2024 (الملاءمة، الضمانات، الضرورة)؛ وإشعار سدايا بالاختراق خلال 72 ساعة | One region in-Kingdom; no cross-border replication of personal or payment data; a tested breach-notification runbookمنطقة واحدة داخل المملكة؛ لا نسخ عبر الحدود للبيانات الشخصية أو بيانات الدفع؛ ودليل تشغيل مختبَر للإشعار بالاختراق |
| In-Kingdom cloud regions (2026, verify)مناطق السحابة داخل المملكة (2026، تحقق) | Oracle (Riyadh, Jeddah), Alibaba/SCCC (Riyadh), STC Cloud, Google Cloud (Dammam); AWS and Microsoft regions announced / openingأوراكل (الرياض، جدة)، علي بابا/SCCC (الرياض)، سحابة STC، جوجل كلاود (الدمام)؛ مناطق AWS ومايكروسوفت معلنة / قيد الافتتاح | Verify region availability and the certified-services list per provider before you commit an architecture to itتحقق من توافر المنطقة وقائمة الخدمات المعتمدة لكل مزود قبل التزام معماريتك بها |
What usually stays on the floorما يبقى عادةً في مقرّك
- Payment HSMs and key custody (or a certified in-country cloud HSM)وحدات أمان المدفوعات وحراسة المفاتيح (أو وحدة أمان سحابية معتمدة داخل البلد)
- Switch / scheme connectivity endpoints (dedicated lines, VPN, IP allow-lists)نقاط الاتصال بالمحوّل / الشبكة (خطوط مخصصة، VPN، قوائم IP المسموحة)
- Core ledger for regulated balances, where the regulator has not approved cloudالدفتر الأساسي للأرصدة المنظَّمة، حيث لم توافق الجهة التنظيمية على السحابة
Architecture that passes reviewمعمارية تجتاز المراجعة
- One region per market; no cross-border replication of personal or payment dataمنطقة واحدة لكل سوق؛ ولا نسخ عبر الحدود للبيانات الشخصية أو بيانات الدفع
- Landing zone with separate accounts for prod / non-prod, private networking, customer-managed keysمنطقة هبوط بحسابات منفصلة للإنتاج / غير الإنتاج، شبكات خاصة، مفاتيح يديرها العميل
- Exit plan and data-return procedure written before go-liveخطة خروج وإجراء إعادة البيانات مكتوبان قبل الإطلاق
- Evidence pack: regulator letter, provider certifications, shared-responsibility matrixحزمة أدلة: خطاب الجهة التنظيمية، شهادات المزود، مصفوفة المسؤولية المشتركة
Cloud is allowed in the Kingdom for regulated payments — with non-objection, classification and in-Kingdom residency. The mistake is assuming the provider's certificate is your approval.السحابة مسموحة في المملكة للمدفوعات المنظَّمة — بعدم ممانعة وتصنيف وإقامة داخل المملكة. والخطأ هو افتراض أن شهادة المزود هي موافقتك.
Resilience: designing for the failure you will haveالمرونة: التصميم للعطل الذي ستواجهه
Targets and vocabularyالأهداف والمفردات
- RTO — how long until service is back; RPO — how much data you may lose. Instant rails push both toward minutes and zero.RTO — كم يستغرق عودة الخدمة؛ RPO — كم من البيانات قد تخسر. تدفع الأنظمة الفورية كليهما نحو الدقائق والصفر.
- Availability: 99.9 % ≈ 8.8 h/year down; 99.99 % ≈ 53 min. Operators set participant targets; SAMA's business-continuity (BCM) rules require tested plans.التوافر: 99.9% ≈ 8.8 ساعات تعطل سنوياً؛ 99.99% ≈ 53 دقيقة. يضع المشغّلون أهداف المشاركين؛ وتشترط قواعد ساما لاستمرارية الأعمال خططاً مختبَرة.
- Blast radius: what else fails when this fails?نطاق الانفجار: ماذا يفشل أيضاً عندما يفشل هذا؟
Patternsالأنماط
- Active-active across availability zones; active-passive across regions where residency allowsنشط-نشط عبر مناطق التوافر؛ ونشط-خامل عبر المناطق حيث تسمح الإقامة
- Time-outs, retries with jitter, circuit breakers per downstream (issuer, PSP, rail)مهل، إعادة محاولة بتشويش، قواطع دوائر لكل نظام لاحق (المُصدر، مقدّم الخدمة، النظام)
- Graceful degradation: queue payouts, hold non-critical fraud calls, offline POS with limitsتدهور رشيق: صف الدفعات الصادرة، تعليق استدعاءات الاحتيال غير الحرجة، نقاط بيع دون اتصال بحدود
- Multi-PSP / multi-acquirer routing for merchants; stand-in for issuersتوجيه متعدد مقدّمي الخدمة / المستحوذين للتجار؛ معالجة بديلة للمُصدرين
- Game days and chaos tests before Ramadan, not duringأيام محاكاة واختبارات فوضى قبل رمضان لا أثناءه
The dependency mapخريطة الاعتماديات
Draw every external dependency with its time-out and its fallback: switch, scheme, PSP, SMS provider for OTP, digital-ID provider, sanctions-list service, HSM, DNS, certificate authority. The one you forgot is the one that takes you down — in the region, SMS gateways and expired certificates are the classic culprits.ارسم كل اعتمادية خارجية مع مهلتها وبديلها: المحوّل، الشبكة، مقدّم الخدمة، مزود SMS للرموز، مزود الهوية الرقمية، خدمة قوائم العقوبات، وحدة الأمان، DNS، سلطة الشهادات. والتي نسيتها هي التي ستُسقطك — وفي المنطقة بوابات SMS والشهادات المنتهية هما المتهمان الكلاسيكيان.
| Failureالعطل | Symptomالعرض | Built-in responseالاستجابة المدمجة |
|---|---|---|
| Issuer host downتوقف مضيف المُصدر | Approval rate for one BIN range drops to 0ينخفض معدل الموافقة لنطاق BIN واحد إلى صفر | Scheme stand-in within limits; issuer alerts on STIP volumeمعالجة بديلة من الشبكة ضمن الحدود؛ تنبيهات للمُصدر عند حجم STIP |
| PSP outageانقطاع مقدّم الخدمة | Merchant checkout errors spikeارتفاع أخطاء الدفع لدى التاجر | Orchestrator fails over to the second PSP; wallet buttons keep workingيتحول المنسّق إلى مقدّم الخدمة الثاني؛ وتظل أزرار المحافظ تعمل |
| SMS provider degradedتدهور مزود SMS | 3DS challenge success collapsesانهيار نجاح تحدي 3DS | Second SMS route; push to in-app approval; issuer risk-based exemptionsمسار SMS ثانٍ؛ التحول إلى الموافقة داخل التطبيق؛ إعفاءات المُصدر القائمة على المخاطر |
| Instant rail unreachableتعذر الوصول إلى النظام الفوري | Transfers stuck in SENT / TIMEOUTتحويلات عالقة في SENT / TIMEOUT | INVESTIGATE state, customer messaging, operator incident channel, no auto-retryحالة INVESTIGATE، رسائل للعملاء، قناة حوادث المشغّل، لا إعادة محاولة تلقائية |
Scalability and the latency budgetقابلية التوسع وميزانية زمن الاستجابة
Capacity planningتخطيط السعة
- Model TPS from business numbers: orders/day × peak-hour share × retry factorنمذج المعاملات في الثانية من أرقام الأعمال: الطلبات/اليوم × حصة ساعة الذروة × معامل إعادة المحاولة
- Plan for 5–10× the normal hour on regional peaks; load-test at 2× the planخطط لـ5–10 أضعاف الساعة العادية في الذروات الإقليمية؛ واختبر الحمل عند ضعف الخطة
- Stateless services scale out; the ledger and the HSM do not — protect them with queues and cachesتتوسع الخدمات عديمة الحالة أفقياً؛ أما الدفتر ووحدة الأمان فلا — احمهما بالطوابير والذاكرة المؤقتة
Where latency hidesأين يختبئ زمن الاستجابة
- Synchronous fraud calls with no time-out budgetاستدعاءات احتيال متزامنة بلا ميزانية مهلة
- Chatty ISO 8583 parsing, XML validation on every hopتحليل ثرثار لـISO 8583، تحقق XML في كل قفزة
- Database locks on the hot account (the merchant's payable) — use per-transaction rows, aggregate laterأقفال قاعدة البيانات على الحساب الساخن (مستحقات التاجر) — استخدم صفوفاً لكل معاملة وجمّع لاحقاً
- Cross-region calls introduced by a "temporary" integrationاستدعاءات عبر المناطق أدخلها تكامل «مؤقت»
The two numbers to publishالرقمان اللذان تنشرهما
p99 latency and approval rate, per rail, per hour. If either moves, someone should be paged before a customer tweets. Everything else on the dashboard is context.زمن استجابة المئين 99 ومعدل الموافقة، لكل نظام، لكل ساعة. إذا تحرك أيهما، ينبغي استدعاء أحدهم قبل أن يغرّد عميل. وكل شيء آخر على لوحة المتابعة سياق.
Observability for payments: what to measure and how to traceالمراقبة في المدفوعات: ماذا تقيس وكيف تتتبع
| Signalالإشارة | Metricالمقياس | Alert whenنبّه عندما |
|---|---|---|
| Approvalالموافقة | Approval rate by rail, BIN range, issuer, merchant category, 3DS outcomeمعدل الموافقة بحسب النظام ونطاق BIN والمُصدر وفئة التاجر ونتيجة 3DS | Drops > 3 points vs the same hour last weekانخفاض > 3 نقاط مقارنة بالساعة نفسها في الأسبوع الماضي |
| Latencyزمن الاستجابة | p50 / p95 / p99 per hop; time-out rateالمئين 50 / 95 / 99 لكل قفزة؛ معدل انقضاء المهل | p99 above budget for 5 min; time-outs > 0.5 %المئين 99 فوق الميزانية 5 دقائق؛ انقضاء المهل > 0.5% |
| Errorsالأخطاء | Decline reasons (ISO / pacs.002 codes) as a distribution, not a totalأسباب الرفض (رموز ISO / pacs.002) كتوزيع لا كمجموع | A single code (91, 05, AM04, AC01) jumpsقفزة رمز واحد (91، 05، AM04، AC01) |
| Unknownsالمجهولات | Payments in INVESTIGATE / pending > N minutesدفعات في INVESTIGATE / معلّقة > N دقيقة | Any > 15 minutes on instant railsأي منها > 15 دقيقة على الأنظمة الفورية |
| Moneyالمال | Recon breaks by age; safeguarding balance vs liabilities; liquidity position vs thresholdفروقات المطابقة بحسب العمر؛ رصيد حفظ الأموال مقابل الالتزامات؛ مركز السيولة مقابل العتبة | Breaks > 24 h; position < 120 % of forecast outflowفروقات > 24 ساعة؛ مركز < 120% من التدفق المتوقع |
| Securityالأمن | Failed auth, webhook signature failures, HSM errors, certificate expiry daysفشل المصادقة، فشل توقيع الإشعارات، أخطاء وحدة الأمان، أيام انتهاء الشهادات | Certificates < 30 days; HSM error rate > 0شهادات < 30 يوماً؛ معدل أخطاء وحدة الأمان > 0 |
Tracing one payment across companiesتتبع دفعة واحدة عبر الشركات
Carry one correlation id end to end and map it to every rail identifier: your payment id ↔ Idempotency-Key ↔ RRN + STAN (cards) ↔ EndToEndId + UETR (ISO 20022) ↔ PSP reference ↔ settlement file line. Operations should type one id and see the whole journey, including hops you do not own.احمل معرّف ارتباط واحداً من طرف إلى طرف واربطه بكل معرّفات الأنظمة: معرّف دفعتك ↔ مفتاح عدم التكرار ↔ RRN + STAN (البطاقات) ↔ EndToEndId + UETR (ISO 20022) ↔ مرجع مقدّم الخدمة ↔ سطر ملف التسوية. وينبغي أن يكتب التشغيل معرّفاً واحداً ويرى الرحلة كاملة بما فيها القفزات التي لا تملكها.
Logging rulesقواعد التسجيل
- Mask PAN (first 6 / last 4 at most), never log CVV, PIN blocks, full tokens' cryptograms or OTPsأخفِ رقم البطاقة (أول 6 / آخر 4 على الأكثر)، ولا تسجّل CVV أو كتل الرقم السري أو تشفير الرموز أو رموز OTP أبداً
- Structured logs with the correlation id; retention per regulator (often 5–10 years for transaction records)سجلات منظمة بمعرّف الارتباط؛ احتفاظ بحسب الجهة التنظيمية (غالباً 5–10 سنوات لسجلات المعاملات)
- Logs are personal data: residency and access control applyالسجلات بيانات شخصية: تنطبق الإقامة والتحكم بالوصول
A payments dashboard is read by four audiences: engineers (latency), product (conversion), operations (unknowns and breaks) and compliance (incidents). Build it once, with four views of the same events.تقرأ لوحة متابعة المدفوعات أربع فئات: المهندسون (زمن الاستجابة)، والمنتج (التحويل)، والعمليات (المجهولات والفروقات)، والامتثال (الحوادث). ابنِها مرة واحدة بأربعة عروض للأحداث نفسها.
Case 4 — Gulf Star Market survives White Fridayالحالة 4 — جلف ستار ماركت تنجو من الجمعة البيضاء
Peak-day engineering for a marketplace · Saudi Arabiaهندسة يوم الذروة لسوق إلكتروني · السعودية
Participants: Gulf Star Market (fictional Riyadh marketplace, 1.2M customers) · two PSPs (primary and secondary) · mada and Apple Pay · Tabby (BNPL) · SARIE IPS for seller payouts · the platform's SRE teamالمشاركون: جلف ستار ماركت (سوق إلكتروني خيالي في الرياض، 1.2 مليون عميل) · مقدّما خدمة (رئيسي وثانوي) · مدى وآبل باي · تابي (الدفع الآجل) · سريع الفوري لدفعات البائعين · فريق موثوقية المنصة- Model. Forecast 12× peak; load-test at 25× on a production-like environment with PSP sandboxes; find the ledger hot row.النمذجة. توقع ذروة 12 ضعفاً؛ اختبار الحمل عند 25 ضعفاً في بيئة شبيهة بالإنتاج مع بيئات اختبار مقدّمي الخدمة؛ العثور على الصف الساخن في الدفتر.
- Ledger. Replace the single payable balance row with per-order postings aggregated every minute; write contention disappears.الدفتر. استبدال صف الرصيد المستحق الواحد بقيود لكل طلب تُجمَّع كل دقيقة؛ فيختفي تنافس الكتابة.
- Routing. Orchestrator with health-based routing: if PSP-A p99 > 2.5 s for 60 s, new card payments go to PSP-B; wallet tokens are network tokens, so they work on both.التوجيه. منسّق بتوجيه قائم على الصحة: إذا تجاوز المئين 99 لمقدّم الخدمة أ 2.5 ثانية لمدة 60 ثانية، تذهب دفعات البطاقات الجديدة إلى ب؛ ورموز المحافظ رموز شبكة فتعمل على كليهما.
- Back-pressure. Idempotent payment intents; client retry with jitter and a cap; a queue in front of fraud scoring with a 300 ms budget and a "score later" fallback for low-value baskets.الضغط العكسي. نيات دفع غير مكرِّرة؛ إعادة محاولة من العميل بتشويش وسقف؛ طابور أمام تقييم الاحتيال بميزانية 300 مللي ثانية وبديل «قيّم لاحقاً» للسلال منخفضة القيمة.
- Payouts. Seller payouts via SARIE IPS are moved off the peak window and batched with limits per minute.الدفعات الصادرة. تُنقل دفعات البائعين عبر سريع الفوري خارج نافذة الذروة وتُجمَّع بحدود لكل دقيقة.
White Friday, this year (illustrative)الجمعة البيضاء هذا العام (توضيحية)
What each role takes awayما يستخلصه كل دور
- Dev: the hot account row is the most common ledger scaling bug in the region's marketplaces and wallets.المطور: صف الحساب الساخن أكثر أخطاء توسع الدفاتر شيوعاً في أسواق المنطقة ومحافظها.
- Ops: failover is a rehearsed runbook with a decision threshold, not a heroic manual switch.العمليات: التحول عند الفشل دليل تشغيل متمرَّن عليه بعتبة قرار، لا تبديل يدوي بطولي.
- Product: "score later" for small baskets is a business decision about fraud appetite — write it down.المنتج: «قيّم لاحقاً» للسلال الصغيرة قرار أعمال عن شهية الاحتيال — دوّنه.
- Risk: the second PSP needs the same due diligence and PCI evidence as the first.المخاطر: يحتاج مقدّم الخدمة الثاني إلى العناية الواجبة وأدلة PCI نفسها كالأول.
Ledgers, event logs and reconciliation technologyالدفاتر وسجلات الأحداث وتقنية المطابقة
Ledger rulesقواعد الدفتر
- Double-entry, immutable postings; corrections are new postingsقيد مزدوج، قيود ثابتة؛ والتصحيحات قيود جديدة
- Money and fees in minor units, integer arithmetic; currency on every lineالمال والرسوم بالوحدات الصغرى وحساب الأعداد الصحيحة؛ والعملة في كل سطر
- Balances derived and cached, rebuildable from eventsالأرصدة مشتقة ومخزّنة مؤقتاً وقابلة لإعادة البناء من الأحداث
- Separate accounts for customer funds (safeguarded), fees, scheme settlement, suspenseحسابات منفصلة لأموال العملاء (المحفوظة) والرسوم وتسوية الشبكة والمعلّق
Reconciliation engineمحرك المطابقة
- Ingest settlement files (scheme, PSP, bank statements camt.053) and match by identifiers first, amount + date secondاستيعاب ملفات التسوية (الشبكة، مقدّم الخدمة، كشوف البنك camt.053) والمطابقة بالمعرّفات أولاً ثم بالمبلغ والتاريخ
- Three-way: what we recorded, what the rail says, what the bank showsثلاثية: ما سجّلناه، وما يقوله النظام، وما يُظهره البنك
- Breaks as work items with age, owner, root-cause codeالفروقات كبنود عمل بعمر ومسؤول ورمز سبب جذري
- Intraday for instant rails; daily for cards; monthly attestationخلال اليوم للأنظمة الفورية؛ يومياً للبطاقات؛ إقرار شهري
Data platformمنصة البيانات
- Event stream → warehouse; PAN never enters analytics (tokens only)بث الأحداث ← المستودع؛ لا يدخل رقم البطاقة التحليلات أبداً (رموز فقط)
- Regulatory returns generated from the same lineage as finance reportsالعوائد التنظيمية مولَّدة من النسب نفسه كتقارير المالية
- Retention and deletion per field, per marketالاحتفاظ والحذف لكل حقل ولكل سوق
Mobile wallets, SoftPOS, QR and NFC under the hoodمحافظ الجوال ونقاط البيع البرمجية ورموز QR وNFC من الداخل
| Technologyالتقنية | How it worksكيف تعمل | Standardsالمعايير | Regional deploymentsالانتشار الإقليمي | Engineering notesملاحظات هندسية |
|---|---|---|---|---|
| Device wallets (NFC)محافظ الأجهزة (NFC) | Network token in the secure element (Apple) or host-card emulation (Android); EMV contactless with a per-tap cryptogramرمز شبكة في العنصر الآمن (آبل) أو محاكاة البطاقة المضيفة (أندرويد)؛ لا تلامسي EMV بتشفير لكل لمسة | EMV contactless kernels, token services (VTS, MDES, mada)نوى EMV اللاتلامسية، خدمات الرموز (VTS، MDES، مدى) | Apple Pay live on mada since 2019; mada Pay, Samsung Pay; Google Pay rolling out — verify the current listآبل باي متاح على مدى منذ 2019؛ مدى باي، سامسونج باي؛ وجوجل باي قيد الانتشار — تحقق من القائمة الحالية | Issuer must run token provisioning + ID&V; merchant gets a wallet token, not a PANيجب على المُصدر تشغيل تزويد الرموز + التحقق من الهوية؛ ويحصل التاجر على رمز محفظة لا رقم بطاقة |
| SoftPOS / tap-to-phoneنقاط البيع البرمجية / اللمس على الهاتف | Merchant's own phone reads contactless cards; attestation and monitoring service checks the device continuouslyيقرأ هاتف التاجر البطاقات اللاتلامسية؛ وتفحص خدمة التصديق والمراقبة الجهاز باستمرار | PCI MPoC (2022→), replacing CPoC / SPoCPCI MPoC (2022←) بديلاً عن CPoC / SPoC | Offered in the Kingdom as mada tap-to-phone — nearpay, neoleap and acquirers serve micro-merchantsيقدَّم في المملكة كلمس على الهاتف عبر مدى — نيرباي ونيوليب والمستحوذون يخدمون صغار التجار | PIN on glass rules; device attestation; offline limits; no PAN on the phoneقواعد الرقم السري على الشاشة؛ تصديق الجهاز؛ حدود دون اتصال؛ لا رقم بطاقة على الهاتف |
| Merchant-presented QRرمز QR يعرضه التاجر | Static or dynamic QR encodes merchant id, amount, reference; the customer's app pays over the instant rail or walletيشفّر QR الثابت أو الديناميكي معرّف التاجر والمبلغ والمرجع؛ ويدفع تطبيق العميل عبر النظام الفوري أو المحفظة | EMVCo QR; the Saudi unified QR profile riding SARIE IPS and madaEMVCo QR؛ وملف QR السعودي الموحد على سريع الفوري ومدى | Bank apps and wallets in the Kingdom scan the unified QR; dynamic QR spreads at food trucks and market stallsتمسح تطبيقات البنوك والمحافظ في المملكة رمز QR الموحد؛ وينتشر QR الديناميكي لدى شاحنات الطعام وبسطات الأسواق | Dynamic QR with amount + reference solves reconciliation; static QR needs a callback the merchant can trustيحل QR الديناميكي بالمبلغ والمرجع المطابقة؛ ويحتاج الثابت إلى إشعار يثق به التاجر |
| Customer-presented QR / barcodeرمز QR / باركود يعرضه العميل | Customer's app shows a one-time token the merchant scansيعرض تطبيق العميل رمزاً لمرة واحدة يمسحه التاجر | Wallet-specific; EMVCo consumer-presentedخاص بكل محفظة؛ EMVCo للعميل | Wallet ecosystems (STC Bank, urpay, Tweeq)منظومات المحافظ (بنك STC، أورباي، تويق) | Short TTL, single use, tied to deviceصلاحية قصيرة، استخدام واحد، مرتبط بالجهاز |
| In-app / deep-link paymentsالدفع داخل التطبيق / بالروابط العميقة | App-to-app redirect for authentication or wallet approval, then returnإعادة توجيه من تطبيق إلى تطبيق للمصادقة أو موافقة المحفظة ثم العودة | OAuth / app links; scheme SDKsOAuth / روابط التطبيقات؛ حزم الشبكات | Open-banking PIS, wallet checkout, BNPLبدء الدفع في المصرفية المفتوحة، الدفع بالمحافظ، اشترِ الآن وادفع لاحقاً | Handle "user never came back": expiry + status pollingعالج «لم يعد المستخدم»: انتهاء + استعلام الحالة |
Case 5 — Tamr Tech puts SoftPOS in the hands of Jeddah's market vendorsالحالة 5 — تمر تك تضع نقاط البيع البرمجية في أيدي باعة أسواق جدة
Tap-to-phone acceptance for micro-merchants · Saudi Arabiaقبول اللمس على الهاتف لصغار التجار · السعودية
Participants: Tamr Tech (fictional SAMA-licensed payment facilitator) · a sponsoring acquirer · mada and Saudi Payments · an MPoC-certified SoftPOS vendor · 3,000 market and food-truck vendorsالمشاركون: تمر تك (ميسّر دفع خيالي مرخّص من ساما) · مستحوذ راعٍ · مدى والمدفوعات السعودية · مورد نقاط بيع برمجية معتمد وفق MPoC · 3,000 بائع في الأسواق وشاحنات الطعام- Certification path. Tamr does not build the NFC kernel: it licenses an MPoC-certified SDK and attestation service; the sponsoring acquirer certifies the solution with mada and the schemes.مسار الاعتماد. لا تبني تمر نواة NFC: ترخّص حزمة وخدمة تصديق معتمدة وفق MPoC؛ ويعتمد المستحوذ الراعي الحل مع مدى والشبكات.
- Onboarding. Nafath-based eKYC, commercial-registration or freelancer-licence lookup, MCC assignment, risk tier with limits — in eleven minutes on the phone.التسجيل. اعرف عميلك إلكترونياً عبر نفاذ، والبحث في السجل التجاري أو رخصة العمل الحر، وتعيين رمز فئة التاجر، ومستوى مخاطر بحدود — في إحدى عشرة دقيقة على الهاتف.
- Security. Device attestation on every session (rooted phone → blocked), PIN-on-glass per MPoC rules, no PAN ever on the device, transaction limits until the vendor's history builds.الأمن. تصديق الجهاز في كل جلسة (هاتف مخترق ← محظور)، الرقم السري على الشاشة وفق قواعد MPoC، لا رقم بطاقة على الجهاز أبداً، وحدود للمعاملات حتى يتكوّن تاريخ البائع.
- Offline. Store-and-forward for up to five transactions under a small cap when connectivity drops in covered markets; flagged as offline in recon.دون اتصال. تخزين ثم إرسال لخمس معاملات على الأكثر تحت سقف صغير عند انقطاع الاتصال في الأسواق المسقوفة؛ وتُعلَّم كغير متصلة في المطابقة.
- Payouts. Acquirer settles to Tamr; Tamr pays vendors via SARIE IPS the same evening, net of fees shown per transaction in the app.الدفعات. يسوّي المستحوذ لتمر؛ وتدفع تمر للباعة عبر سريع الفوري في المساء نفسه، صافي الرسوم المعروضة لكل معاملة في التطبيق.
Why the facilitator model works hereلماذا ينجح نموذج الميسّر هنا
The acquirer keeps the scheme relationship and settlement risk; the facilitator owns onboarding, the app and vendor experience; the vendor gets acceptance in an afternoon. SAMA's payment-services rules define what a facilitator may and may not do — including that vendor funds must not sit with the facilitator beyond the permitted window.يحتفظ المستحوذ بعلاقة الشبكة ومخاطر التسوية؛ ويملك الميسّر التسجيل والتطبيق وتجربة البائع؛ ويحصل البائع على القبول في عصر يوم. وتحدد قواعد ساما لخدمات الدفع ما يجوز للميسّر وما لا يجوز — ومنها ألا تبقى أموال الباعة لدى الميسّر بعد النافذة المسموحة.
What each role takes awayما يستخلصه كل دور
- Product: onboarding time and payout time are the product; NFC is the commodity.المنتج: زمن التسجيل وزمن الدفع هما المنتج؛ وNFC سلعة.
- Dev: buy the certified kernel; build the merchant lifecycle, limits and recon.المطور: اشترِ النواة المعتمدة؛ وابنِ دورة حياة التاجر والحدود والمطابقة.
- Ops: offline transactions and attestation failures need their own queues.العمليات: تحتاج معاملات دون اتصال وإخفاقات التصديق إلى طوابير خاصة.
- Risk: micro-merchant fraud (fake vendors cashing stolen cards) is the main threat — limits and velocity rules from day one.المخاطر: احتيال صغار التجار (باعة وهميون يصرفون بطاقات مسروقة) هو التهديد الرئيسي — حدود وقواعد سرعة منذ اليوم الأول.
Build, buy or partner: the platform decisionبناء أم شراء أم شراكة: قرار المنصة
| Capabilityالقدرة | Buildبناء | Buy (vendor)شراء (مورد) | Partner (PSP / BaaS)شراكة (مقدّم خدمة / خدمات مصرفية كمنصة) |
|---|---|---|---|
| Checkout & gatewayالدفع والبوابة | Rarelyنادراً | Orchestratorsالمنسّقون | Default for merchantsالافتراضي للتجار |
| Card issuing / processingإصدار / معالجة البطاقات | Large banksالبنوك الكبيرة | Processor platformsمنصات المعالجة | Issuing APIs for fintechsواجهات الإصدار لشركات التقنية المالية |
| Ledgerالدفتر | Core of a wallet / PSPجوهر المحفظة / مقدّم الخدمة | Core-banking vendorsموردو الأنظمة المصرفية | Rarelyنادراً |
| Instant-payment connectivityالاتصال بالدفع الفوري | Banksالبنوك | Rail adapters / hubsمحوّلات / مراكز الأنظمة | Via a sponsor bankعبر بنك راعٍ |
| Fraud & AML monitoringمراقبة الاحتيال وغسل الأموال | Rules layerطبقة القواعد | Specialist vendorsموردون متخصصون | PSP-provided basicsأساسيات من مقدّم الخدمة |
| KYC / digital identityاعرف عميلك / الهوية الرقمية | Noلا | eKYC vendors + national IDموردو اعرف عميلك الإلكتروني + الهوية الوطنية | Bundled by BaaSمضمّنة في خدمات المنصة |
| HSM & key managementوحدة الأمان وإدارة المفاتيح | Noلا | Certified HSMs / cloud HSMوحدات أمان معتمدة / سحابية | Inside processorداخل المعالج |
How to decideكيف تقرر
- Build what differentiates and what you must control for the licence (ledger, limits, customer experience).ابنِ ما يميّزك وما يجب أن تتحكم به للترخيص (الدفتر، الحدود، تجربة العميل).
- Buy what is certified and commoditised (HSMs, EMV kernels, sanctions screening, 3DS server).اشترِ ما هو معتمد وسلعي (وحدات الأمان، نوى EMV، فحص العقوبات، خادم 3DS).
- Partner where a licence or scheme membership is the barrier (acquiring, issuing BINs, rail access).شارك حيث يكون الترخيص أو عضوية الشبكة هو الحاجز (الاستحواذ، نطاقات الإصدار، الوصول إلى الأنظمة).
- Total cost = licence + integration + certification + operations + exit; the last two are the ones forgotten.التكلفة الإجمالية = الترخيص + التكامل + الاعتماد + التشغيل + الخروج؛ والأخيران هما المنسيان.
Lock-in questionsأسئلة الاحتكار
- Can we export tokens and customer data on exit?هل نستطيع تصدير الرموز وبيانات العملاء عند الخروج؟
- Is the API a standard (ISO 20022-shaped) or proprietary?هل الواجهة معيارية (على شكل ISO 20022) أم مملوكة؟
- Who owns the merchant / customer contract and the scheme relationship?من يملك عقد التاجر / العميل وعلاقة الشبكة؟
- What is the vendor's own residency and regulator approval status in each market?ما وضع الإقامة وموافقة الجهة التنظيمية للمورد نفسه في كل سوق؟
Delivery: secure SDLC, certification and change controlالتسليم: دورة تطوير آمنة واعتماد وضبط تغيير
Test assets that matterأصول الاختبار المهمة
- Golden message files per rail and version (ISO 8583 dialect, pacs.008 usage guideline)ملفات رسائل مرجعية لكل نظام وإصدار (لهجة ISO 8583، إرشادات pacs.008)
- Scheme and rail sandboxes; EMV Level 3 test cards; 3DS test issuersبيئات اختبار الشبكات والأنظمة؛ بطاقات اختبار EMV المستوى 3؛ مُصدرو اختبار 3DS
- Contract tests for every PSP / webhook; chaos tests for time-outsاختبارات عقود لكل مقدّم خدمة / إشعار؛ اختبارات فوضى لانقضاء المهل
- Synthetic, never production, data in non-prodبيانات اصطناعية لا إنتاجية أبداً في غير الإنتاج
Release disciplineانضباط الإصدار
- Feature flags and canaries by merchant / BIN range / railأعلام الميزات والإصدارات التجريبية بحسب التاجر / نطاق BIN / النظام
- Change freeze around peaks and scheme release datesتجميد التغييرات حول الذروات ومواعيد إصدارات الشبكات
- Every change has a ticket, an approver who is not the author, and a rollback that was testedلكل تغيير تذكرة وموافِق غير المؤلف وتراجع مختبَر
- Certificate and key expiry in the release calendarانتهاء الشهادات والمفاتيح في تقويم الإصدارات
What the regulator will askما ستسأله الجهة التنظيمية
- Show the change record for the incident dateأرِ سجل التغيير لتاريخ الحادث
- Who can deploy to production, and how is that reviewed?من يستطيع النشر إلى الإنتاج وكيف يُراجَع ذلك؟
- Where is the evidence that production data never entered test?أين الدليل على أن بيانات الإنتاج لم تدخل الاختبار قط؟
- Which scheme certifications are current, and when do they expire?أي اعتمادات الشبكات سارية ومتى تنتهي؟
What is arriving: AI in the stack, CBDC rails, programmable moneyما هو قادم: الذكاء الاصطناعي في المنظومة ومسارات العملات الرقمية للبنوك المركزية والمال القابل للبرمجة
| Trendالاتجاه | What it changes technicallyما يغيّره تقنياً | Regional signalsإشارات إقليمية | What to do nowما تفعله الآن |
|---|---|---|---|
| ML in authorisation and operationsالتعلّم الآلي في التفويض والتشغيل | Real-time fraud scoring with feature stores; smart retries and routing; anomaly detection on approval rates; LLM assistants over dispute and reconciliation dataتقييم احتيال فوري بمخازن ميزات؛ إعادة محاولة وتوجيه ذكيان؛ كشف الشذوذ في معدلات الموافقة؛ مساعدون لغويون فوق بيانات النزاعات والمطابقة | Saudi schemes and PSPs market ML-driven routing and fraud tools; SAMA and SDAIA ask for model governanceتسوّق الشبكات ومقدّمو الخدمة السعوديون أدوات التوجيه والاحتيال المدفوعة بالتعلّم الآلي؛ وتطلب ساما وسدايا حوكمة النماذج | Keep a 300 ms budget and a deterministic fallback; log features and scores for audit (Chapter 08)احتفظ بميزانية 300 مللي ثانية وبديل حتمي؛ وسجّل الميزات والدرجات للتدقيق (الفصل 08) |
| CBDC and tokenised depositsالعملات الرقمية للبنوك المركزية والودائع المرمّزة | New rail with wallet, token and settlement APIs; possibly programmable conditionsنظام جديد بواجهات للمحافظ والرموز والتسوية؛ وربما شروط قابلة للبرمجة | Project Aber (SAMA wholesale CBDC pilot with the UAE), mBridge (SAMA joined 2024); SAMA studies wholesale CBDC — status: verifyمشروع عابر (تجربة ساما للعملة الرقمية بالجملة مع الإمارات)، mBridge (انضمت ساما 2024)؛ وتدرس ساما عملة رقمية بالجملة — الوضع: تحقق | Keep connectors pluggable; model money movement on ISO 20022 semantics so a new rail is an adapterأبقِ الموصّلات قابلة للتبديل؛ ونمذج حركة المال على دلالات ISO 20022 ليكون النظام الجديد محوّلاً |
| Stablecoins and crypto railsالعملات المستقرة ومسارات الأصول الرقمية | On-chain settlement; custody, key management, travel-rule dataتسوية على السلسلة؛ حفظ، إدارة مفاتيح، بيانات قاعدة السفر | SAMA restrictive on crypto payments; no licensed stablecoin rail in the Kingdom; banks warned off crypto flows — see Chapter 10ساما مقيِّدة لمدفوعات الأصول الرقمية؛ لا نظام عملات مستقرة مرخّصاً في المملكة؛ والبنوك محذَّرة من تدفقات الأصول الرقمية — انظر الفصل 10 | Treat as another rail behind the same ledger and compliance controlsعاملها كنظام آخر خلف الدفتر وضوابط الامتثال نفسها |
| Open finance and embedded paymentsالتمويل المفتوح والمدفوعات المضمّنة | FAPI-grade APIs; consent objects; payments inside non-financial appsواجهات بمستوى FAPI؛ كيانات موافقة؛ مدفوعات داخل تطبيقات غير مالية | SAMA Open Banking Framework — account information live, payment initiation phasing in (Chapter 06)إطار المصرفية المفتوحة لدى ساما — خدمة معلومات الحسابات مطلقة وبدء الدفع قيد التدرج (الفصل 06) | Design your APIs to the national standards so you can be both consumer and providerصمم واجهاتك وفق المعايير الوطنية لتكون مستهلكاً ومزوداً معاً |
| Post-quantum cryptographyالتشفير ما بعد الكمّي | New key-exchange and signature algorithms in TLS, HSMs and EMV over the coming decadeخوارزميات جديدة لتبادل المفاتيح والتوقيع في TLS ووحدات الأمان وEMV خلال العقد القادم | Scheme and standards-body roadmaps published; regulators starting to ask for crypto-agilityخرائط طريق الشبكات وهيئات المعايير منشورة؛ وبدأت الجهات التنظيمية تطلب المرونة التشفيرية | Inventory every algorithm and key; make rotation routine nowاجرد كل خوارزمية ومفتاح؛ واجعل التدوير روتينياً الآن |
What each role owns in payment technologyما يتولاه كل دور في تقنية المدفوعات
● = you own it · ◐ = you contribute · — = usually not involved.● = تتولاه · ◐ = تساهم فيه · — = عادةً غير معني.
| Topicالموضوع | BA / Productالمحلل / المنتج | Operationsالعمليات | Developersالمطورون | Compliance / Riskالامتثال / المخاطر | Typical artefactالمخرج المعتاد |
|---|---|---|---|---|---|
| Architecture and integration patternالمعمارية ونمط التكامل | ● | ◐ | ● | ◐ | Architecture decision record, PCI scope diagramسجل قرار معماري، مخطط نطاق PCI |
| API contracts, webhooks, idempotencyعقود الواجهات، الإشعارات، عدم التكرار | ● | — | ● | — | OpenAPI spec, state machine, error catalogueمواصفة OpenAPI، آلة الحالات، فهرس الأخطاء |
| Instant-payment participationالمشاركة في الدفع الفوري | ◐ | ● | ● | ● | Participant runbook, liquidity thresholds, INVESTIGATE queueدليل المشارك، عتبات السيولة، طابور INVESTIGATE |
| Tokens, HSMs, keysالرموز، وحدات الأمان، المفاتيح | ◐ | ◐ | ● | ● | Key inventory, ceremony records, token strategyجرد المفاتيح، سجلات المراسم، استراتيجية الرموز |
| Authentication and 3DSالمصادقة و3DS | ● | ◐ | ● | ● | Step-up policy, challenge metricsسياسة التصعيد، مقاييس التحدي |
| Cloud, residency, resilienceالسحابة، الإقامة، المرونة | ◐ | ● | ● | ● | Landing-zone design, BCP/DR tests, regulator lettersتصميم منطقة الهبوط، اختبارات الاستمرارية، خطابات الجهة التنظيمية |
| Capacity and peaksالسعة والذروات | ● | ● | ● | — | Peak forecast, load-test report, freeze calendarتوقع الذروة، تقرير اختبار الحمل، تقويم التجميد |
| Observabilityالمراقبة | ◐ | ● | ● | ◐ | Dashboards per audience, alert catalogue, trace by idلوحات لكل فئة، فهرس التنبيهات، التتبع بالمعرّف |
| Ledger and reconciliationالدفتر والمطابقة | ◐ | ● | ● | ◐ | Chart of accounts, recon rules, break workflowدليل الحسابات، قواعد المطابقة، سير عمل الفروقات |
| Delivery and change controlالتسليم وضبط التغيير | ◐ | ● | ● | ● | Pipeline gates, change records, certification calendarبوابات الخط، سجلات التغيير، تقويم الاعتماد |
Six misconceptions to unlearn todayست مغالطات عليك التخلّص منها اليوم
"A time-out means the payment failed."«انقضاء المهلة يعني فشل الدفعة.»
It means unknown. Query before you release funds or let the customer retry — on cards (reversal), on instant rails (status enquiry) and on wallets (callback wait).يعني مجهول. استعلم قبل تحرير الأموال أو السماح للعميل بإعادة المحاولة — على البطاقات (الإلغاء)، وعلى الأنظمة الفورية (الاستعلام عن الحالة)، وعلى المحافظ (انتظار الرد).
"Encrypting card numbers makes us compliant."«تشفير أرقام البطاقات يجعلنا ممتثلين.»
Encrypted PAN is still PAN in scope. Tokens from a PSP or the network remove it; encryption only protects it.رقم البطاقة المشفّر لا يزال ضمن النطاق. تزيله الرموز من مقدّم الخدمة أو الشبكة؛ ويحميه التشفير فقط.
"The cloud provider's certificate covers our residency."«شهادة مزود السحابة تغطي إقامتنا.»
Residency is your architecture choice plus your regulator's approval. The provider's SOC/ISO reports are inputs, not the answer.الإقامة خيارك المعماري مع موافقة جهتك التنظيمية. وتقارير SOC/ISO للمزود مدخلات لا الجواب.
"Webhooks tell us the money arrived."«تخبرنا الإشعارات أن المال وصل.»
A webhook is a hint. Fetch the object, and trust settlement files and camt.053 for money. Reconciliation, not notifications, closes the loop.الإشعار تلميح. اجلب الكيان، وثق بملفات التسوية وcamt.053 للمال. والمطابقة لا الإشعارات هي التي تغلق الحلقة.
"Balances are a column we update."«الأرصدة عمود نحدّثه.»
Balances are derived from immutable postings. An updated column with no event history cannot be audited, rebuilt or reconciled — and it is the hot row that falls over on peak day.الأرصدة مشتقة من قيود ثابتة. والعمود المحدَّث بلا تاريخ أحداث لا يمكن تدقيقه أو إعادة بنائه أو مطابقته — وهو الصف الساخن الذي ينهار يوم الذروة.
"Connecting to the switch is a two-week integration."«الاتصال بالمحوّل تكامل من أسبوعين.»
Message formats are the easy part. Key ceremonies, certification cycles, dedicated connectivity and 24×7 operations make it months — plan for it.صيغ الرسائل هي الجزء السهل. ومراسم المفاتيح ودورات الاعتماد والاتصال المخصص والتشغيل 24×7 تجعله شهوراً — خطط لذلك.
Glossaryالمسرد
- ACS / 3DS serverخادم التحكم / خادم 3DS
- Issuer-side and merchant-side components of EMV 3-D Secure, linked by the scheme directory server.مكوّنا EMV 3-D Secure لدى المُصدر والتاجر، يربطهما خادم دليل الشبكة.
- ARQC / ARPCARQC / ARPC
- EMV request and response cryptograms proving the chip and the issuer took part.تشفيرا الطلب والرد في EMV يثبتان مشاركة الشريحة والمُصدر.
- Attestationالتصديق
- Continuous check that a device or app is genuine and untampered (SoftPOS, mobile banking).فحص مستمر لكون الجهاز أو التطبيق أصلياً وغير معدَّل (نقاط البيع البرمجية، الخدمات المصرفية عبر الجوال).
- Circuit breakerقاطع الدائرة
- Pattern that stops calling a failing dependency for a while instead of piling up time-outs.نمط يوقف استدعاء اعتمادية فاشلة لفترة بدل تراكم انقضاء المهل.
- Correlation idمعرّف الارتباط
- One identifier carried through every hop and log line of a payment.معرّف واحد يُحمل عبر كل قفزة وسطر سجل للدفعة.
- DUKPTDUKPT
- Derived unique key per transaction — terminal key scheme where each transaction uses a fresh key.مفتاح فريد مشتق لكل معاملة — نظام مفاتيح الطرفيات حيث تستخدم كل معاملة مفتاحاً جديداً.
- HCE / secure elementمحاكاة البطاقة المضيفة / العنصر الآمن
- Two ways a phone stores wallet tokens: software with cloud keys, or a tamper-resistant chip.طريقتان يخزّن بهما الهاتف رموز المحفظة: برمجياً بمفاتيح سحابية، أو شريحة مقاومة للعبث.
- HSMوحدة الأمان العتادية
- Hardware security module holding keys and performing PIN, cryptogram and key operations.جهاز يحفظ المفاتيح وينفّذ عمليات الرقم السري والتشفير والمفاتيح.
- Idempotency keyمفتاح عدم التكرار
- Client-generated unique key that makes a retried request return the original result.مفتاح فريد يولّده العميل يجعل الطلب المعاد يُرجع النتيجة الأصلية.
- MPoCMPoC
- PCI standard for mobile payment acceptance on commercial off-the-shelf devices (SoftPOS).معيار PCI لقبول المدفوعات على الأجهزة التجارية الجاهزة (نقاط البيع البرمجية).
- Network tokenرمز الشبكة
- Scheme-issued substitute for a PAN, bound to a device or merchant, with lifecycle management.بديل عن رقم البطاقة تصدره الشبكة، مرتبط بجهاز أو تاجر، مع إدارة دورة الحياة.
- Orchestratorالمنسّق
- Layer that routes payments across PSPs and rails, retries, and unifies tokens and reporting.طبقة توجّه الدفعات عبر مقدّمي الخدمة والأنظمة وتعيد المحاولة وتوحّد الرموز والتقارير.
- Outbox patternنمط الصندوق الصادر
- Writing state and event in one transaction, then publishing from the outbox table.كتابة الحالة والحدث في معاملة واحدة ثم النشر من جدول الصندوق الصادر.
- p99المئين 99
- Latency below which 99 % of requests complete — the number peak-day customers feel.زمن الاستجابة الذي تكتمل دونه 99% من الطلبات — الرقم الذي يشعر به عملاء يوم الذروة.
- Payment facilitatorميسّر الدفع
- Entity that onboards sub-merchants under a sponsoring acquirer's licence and scheme membership.كيان يسجّل تجاراً فرعيين تحت ترخيص مستحوذ راعٍ وعضويته في الشبكة.
- RRN / STANRRN / STAN
- Retrieval reference number and system trace audit number — ISO 8583 identifiers used for matching and reversals.رقم مرجع الاسترجاع ورقم تتبع النظام — معرّفات ISO 8583 للمطابقة والإلغاءات.
- RTO / RPORTO / RPO
- Recovery time objective and recovery point objective for a service.هدف زمن الاستعادة وهدف نقطة الاستعادة لخدمة ما.
- Stand-in (STIP)المعالجة البديلة (STIP)
- Scheme or switch approving on the issuer's behalf when the issuer is unreachable.موافقة الشبكة أو المحوّل نيابةً عن المُصدر عندما يتعذر الوصول إليه.
- Store-and-forwardالتخزين ثم الإرسال
- Accepting transactions offline under a cap and sending them when connectivity returns.قبول المعاملات دون اتصال تحت سقف وإرسالها عند عودة الاتصال.
- ZMK / ZPKZMK / ZPK
- Zone master key and zone PIN key shared between two parties for key and PIN exchange.مفتاح المنطقة الرئيسي ومفتاح الرقم السري للمنطقة المشتركان بين طرفين لتبادل المفاتيح والأرقام السرية.
- Landing zoneمنطقة الهبوط
- Pre-approved cloud account structure with networking, identity, logging and residency controls.هيكل حسابات سحابية معتمد مسبقاً بضوابط الشبكات والهوية والتسجيل والإقامة.
Knowledge checkاختبار الفهم
Ten questions. Click an answer to see immediate feedback; your score appears after the last one.عشرة أسئلة. انقر على إجابة لترى التغذية الراجعة فوراً؛ وتظهر نتيجتك بعد السؤال الأخير.
Workshop: design the integration and its failure modesورشة عمل: صمم التكامل وأعطاله
Groups of three (40 min). Pick one: (a) a Riyadh food-delivery app adding mada, Apple Pay and SARIE IPS payouts to riders; (b) a Jeddah bank adding SARIE IPS request-to-pay for rent collection; (c) a Dammam marketplace adding unified QR and STC Bank wallet pay; (d) a Riyadh PSP adding a second acquirer for failover.مجموعات من ثلاثة (40 دقيقة). اختر واحداً: (أ) تطبيق توصيل طعام في الرياض يضيف مدى وآبل باي ودفعات سريع الفوري للمندوبين؛ (ب) بنك في جدة يضيف طلب الدفع عبر سريع الفوري لتحصيل الإيجارات؛ (ج) سوق إلكتروني في الدمام يضيف QR الموحد والدفع بمحفظة بنك STC؛ (د) مقدّم خدمة في الرياض يضيف مستحوذاً ثانياً للتحول عند الفشل.
Rulesالقواعد
- Draw the five layers; mark every arrow with its time-out and its unknown-state handling.ارسم الطبقات الخمس؛ وعلّم كل سهم بمهلته ومعالجة حالته المجهولة.
- State where PAN enters and where it is stored (or why it never is).حدد أين يدخل رقم البطاقة وأين يُخزَّن (أو لماذا لا يُخزَّن أبداً).
- Name the identifiers you will use to trace one payment end to end.سمِّ المعرّفات التي ستستخدمها لتتبع دفعة واحدة من طرف إلى طرف.
Stretchهدف إضافي
Run a 10-minute pre-mortem: it is the evening of the 27th (salary day) and your busiest hour; write the three failures most likely to happen and what the customer sees for each.نفّذ تحليل ما قبل الحادث لعشر دقائق: مساء يوم 27 (يوم الرواتب) وأكثر ساعاتك ازدحاماً؛ اكتب الأعطال الثلاثة الأرجح وما يراه العميل في كل منها.
| Design questionسؤال التصميم | Your answerإجابتك |
|---|---|
| Integration pattern(s) and why; PCI scope statementنمط (أنماط) التكامل ولماذا؛ بيان نطاق PCI | |
| Payment state machine including the unknown stateآلة حالات الدفع بما فيها الحالة المجهولة | |
| Idempotency: who generates the key, where it is stored, how longعدم التكرار: من يولّد المفتاح، وأين يُخزَّن، وكم من الوقت | |
| Webhook / callback handling and reconciliation source of truthمعالجة الإشعارات / الردود ومصدر الحقيقة للمطابقة | |
| Tokens and keys: what you hold, what the PSP / scheme holdsالرموز والمفاتيح: ما تحمله، وما يحمله مقدّم الخدمة / الشبكة | |
| Residency and hosting per component; regulator approval needed?الإقامة والاستضافة لكل مكوّن؛ هل تلزم موافقة الجهة التنظيمية؟ | |
| Peak plan: forecast multiplier, back-pressure, failover thresholdخطة الذروة: مضاعف التوقع، الضغط العكسي، عتبة التحول عند الفشل | |
| Dashboard: the four tiles you would put on the wallلوحة المتابعة: البلاطات الأربع التي ستضعها على الجدار |
Summary and what comes nextالخلاصة وما التالي
Seven things to carry forwardسبعة أمور تحملها معك
- Five layers — channels, edge, orchestration, core, connectors — and three review questions: where is PAN, where does money move, what happens on time-out.خمس طبقات — القنوات والحافة والتنسيق والأساسية والموصّلات — وثلاثة أسئلة للمراجعة: أين رقم البطاقة، وأين يتحرك المال، وماذا يحدث عند انقضاء المهلة.
- Integration pattern decides PCI scope, conversion and latency; hosted fields plus wallets is the default for merchants.يحدد نمط التكامل نطاق PCI والتحويل وزمن الاستجابة؛ والحقول المستضافة مع المحافظ هي الافتراضي للتجار.
- Idempotency keys, outbox events and an explicit unknown state are how payments survive retries and time-outs.مفاتيح عدم التكرار وأحداث الصندوق الصادر وحالة مجهولة صريحة هي كيف تصمد المدفوعات أمام إعادة المحاولة وانقضاء المهل.
- Tokens move PAN out of your systems; HSMs keep keys and PINs out of your code.تنقل الرموز رقم البطاقة خارج أنظمتك؛ وتبقي وحدات الأمان المفاتيح والأرقام السرية خارج شفرتك.
- Instant-payment participation means 24×7, seconds-level SLAs, liquidity monitoring and intraday reconciliation.تعني المشاركة في الدفع الفوري 24×7 واتفاقيات بالثواني ومراقبة السيولة ومطابقة خلال اليوم.
- Cloud is allowed with approval and residency; resilience and capacity are planned around regional peaks and tested before them.السحابة مسموحة بموافقة وإقامة؛ والمرونة والسعة تُخطَّطان حول الذروات الإقليمية وتُختبران قبلها.
- Publish p99 and approval rate per rail; trace by one id; ship through a pipeline with certification and change gates.انشر المئين 99 ومعدل الموافقة لكل نظام؛ وتتبع بمعرّف واحد؛ وسلّم عبر خط ببوابات اعتماد وتغيير.
Next: Chapter 08 — Risk & Fraud Managementالتالي: الفصل 08 — إدارة المخاطر والاحتيال
Who is attacking the stack you just built and how: card-not-present and account-takeover fraud, social engineering and OTP theft, mule accounts and instant-payment scams, merchant and first-party fraud; detection with rules and models, risk scoring and step-up authentication; chargeback and dispute economics; operational risk, incident management and the regional fraud data that tells you where to look first.من يهاجم المنظومة التي بنيتها للتو وكيف: احتيال البطاقة غير الحاضرة والاستيلاء على الحسابات، والهندسة الاجتماعية وسرقة رموز OTP، وحسابات البغال واحتيال الدفع الفوري، واحتيال التجار والطرف الأول؛ والكشف بالقواعد والنماذج، وتقييم المخاطر والمصادقة المصعَّدة؛ واقتصاد النزاعات والاعتراضات؛ والمخاطر التشغيلية وإدارة الحوادث وبيانات الاحتيال الإقليمية التي تخبرك أين تنظر أولاً.
Before the next sessionقبل الجلسة التالية
- Finish the integration design and the pre-mortem list.أكمل تصميم التكامل وقائمة ما قبل الحادث.
- Find your platform's real p99 and approval rate for last month, per rail; note whether anyone is alerted on them.ابحث عن المئين 99 ومعدل الموافقة الفعليين لمنصتك للشهر الماضي لكل نظام؛ ودوّن ما إذا كان أحد يُنبَّه عليهما.
- Ask where your PANs live (if anywhere) and who holds the key components for your HSM.اسأل أين تعيش أرقام بطاقاتك (إن وُجدت) ومن يحمل مكوّنات مفاتيح وحدة الأمان لديك.
Sources and notesالمصادر والملاحظات
PCI SSC standards (DSS v4.0/4.0.1, MPoC, PIN, HSM) · EMVCo specifications (contactless, 3-D Secure 2, QR, tokenisation) · scheme token services (Visa VTS, Mastercard MDES, mada) · ISO 8583 / ISO 20022 · the SARIE IPS participant guide (Saudi Payments) · SAMA cloud, outsourcing and business-continuity rules · NCA ECC and cloud controls · SDAIA PDPL transfer regulations · cloud providers' published region lists (2026). Latency figures, peak multipliers and case results are illustrative; companies and people in the cases are fictional.معايير مجلس PCI (DSS 4.0/4.0.1، MPoC، PIN، HSM) · مواصفات EMVCo (اللاتلامسي، 3-D Secure 2، QR، الترميز) · خدمات رموز الشبكات (فيزا VTS، ماستركارد MDES، مدى) · ISO 8583 / ISO 20022 · دليل المشارك في سريع الفوري (المدفوعات السعودية) · قواعد السحابة والإسناد الخارجي واستمرارية الأعمال لدى ساما · الضوابط الأساسية والسحابية للهيئة الوطنية للأمن السيبراني · لوائح النقل لنظام حماية البيانات لدى سدايا · قوائم المناطق المنشورة لمزودي السحابة (2026). أرقام زمن الاستجابة ومضاعفات الذروة ونتائج الحالات توضيحية؛ والشركات والأشخاص في الحالات خياليون.