MENA Payments Academy — KSA Editionأكاديمية المدفوعات — نسخة السعوديةHow money moves in Saudi Arabia — a practitioner's courseكيف يتحرك المال في السعودية — دورة عملية للممارسين
Stage 3: Standards, Regulation & Technologyالمرحلة 3: المعايير والتنظيم والتقنية  ›  Chapter 07 — Technology in Paymentsالفصل 07 — التقنية في المدفوعات
Stage 3 · Standards, Regulation & Technology · Chapter 07المرحلة 3 · المعايير والتنظيم والتقنية · الفصل 07

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.الأنظمة خلف القواعد. يفتح هذا الفصل منصة دفع طبقةً طبقة — القنوات والبوابات والتنسيق والدفاتر والموصّلات — ويتتبع تفويضاً واحداً عبرها في مللي ثوانٍ. ويغطي أنماط التكامل التي يختار بينها التجار والبنوك، والرموز ووحدات الأمان العتادية التي تُبقي بيانات البطاقات خارج قواعد بياناتك، ومعمارية المشارك في الدفع الفوري، وخيارات السحابة والإقامة وفق قواعد ساما والهيئة الوطنية للأمن السيبراني ونظام حماية البيانات الشخصية، والمرونة وسعة أيام الذروة، والمراقبة، وخط التسليم الذي تتوقعه الجهات التنظيمية — مع فرق خيالية على أنظمة حقيقية تُظهر ما ينجح وما يفشل.

Durationالمدة≈ 80 minutes · 32 slides≈ 80 دقيقة · 32 شريحة
Prerequisitesالمتطلبات المسبقةChapters 02, 03, 05 and 06الفصول 02 و03 و05 و06
Case scenariosالحالات الدراسية5 named scenarios · all in Saudi Arabia5 حالات مسمّاة · كلها في السعودية
Ends withينتهي بـRole matrix · glossary · 10-question check · integration-design workshopمصفوفة الأدوار · مسرد · اختبار من 10 أسئلة · ورشة تصميم التكامل
07.01
Orientationالتمهيد

Learning objectivesأهداف التعلّم

By the end of this chapter you will be able to:بنهاية هذا الفصل ستكون قادراً على:

  1. Draw the reference architecture of a payment platform and place gateways, switches, processors, orchestrators and ledgers on it.رسم المعمارية المرجعية لمنصة دفع ووضع البوابات والمحوّلات والمعالجات والمنسّقين والدفاتر عليها.
  2. Choose an integration pattern (hosted page, SDK, direct API, host-to-host, file) and explain its PCI and latency consequences.اختيار نمط تكامل (صفحة مستضافة، حزمة تطوير، واجهة مباشرة، مضيف إلى مضيف، ملف) وشرح تبعاته على PCI وزمن الاستجابة.
  3. Design idempotent, event-driven payment flows that survive time-outs and retries.تصميم تدفقات دفع غير مكرِّرة وقائمة على الأحداث تصمد أمام انقضاء المهل وإعادة المحاولة.
  4. Explain acquirer, network and device tokens, and what an HSM does for PINs, cryptograms and keys.شرح رموز المستحوذ والشبكة والجهاز، وما تفعله وحدة الأمان العتادية للأرقام السرية والتشفير والمفاتيح.
  5. Describe the architecture of an instant-payment participant and its liquidity, time-out and 24×7 constraints.وصف معمارية المشارك في الدفع الفوري وقيود السيولة وانقضاء المهل والتشغيل 24×7.
  6. Make cloud, residency, resilience and capacity decisions that satisfy SAMA, the NCA and SDAIA.اتخاذ قرارات السحابة والإقامة والمرونة والسعة التي ترضي ساما والهيئة الوطنية للأمن السيبراني وسدايا.
  7. 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.كل مخطط مرشح لمراجعة معماريتك أنت. عندما تقابل مربعاً لا تملكه، اسأل من يتولى تلك الوظيفة نيابةً عنك — مورد أو مقدّم خدمة أو الشبكة — وماذا سترى إذا فشل.

DevelopersالمطورونBA / PMمحلل / مدير منتجOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.02
The landscapeالمشهد

A reference architecture for a payment platformمعمارية مرجعية لمنصة دفع

ChannelsالقنواتMobile appتطبيق الجوالWeb checkoutالدفع عبر الويبPOS / SoftPOSنقاط البيع / البرمجيةPartner APIsواجهات الشركاءBranch / agentالفرع / الوكيلEdgeالحافةAPI gatewayبوابة الواجهاتAuth / OAuthالمصادقة / OAuthRate limitingتحديد المعدلWAF / bot defenceجدار التطبيقات / صد الروبوتاتIdempotency storeمخزن عدم التكرارOrchestrationالتنسيقPayment orchestratorمنسّق الدفعRouting rulesقواعد التوجيهFraud / risk callsاستدعاءات الاحتيال / المخاطر3DS / SCAالمصادقة القوية / 3DSRetry & state machineإعادة المحاولة وآلة الحالاتCore servicesالخدمات الأساسيةLedger / accountsالدفتر / الحساباتTokens vaultخزنة الرموزLimits & feesالحدود والرسومRecon engineمحرك المطابقةNotificationsالإشعاراتConnectorsالموصّلاتCard switch (ISO 8583)محوّل البطاقات (ISO 8583)Instant rail (ISO 20022)النظام الفوري (ISO 20022)Wallet / bill-payالمحافظ / الفواتيرSWIFT / Bunaسويفت / بُنىBank host / coreمضيف البنك / النظام الأساسيCross-cutting: HSMs & key management · secrets · logging with PAN masking · observability · CI/CD with change control · data residency per marketعابر للطبقات: وحدات الأمان العتادية وإدارة المفاتيح · الأسرار · التسجيل مع إخفاء رقم البطاقة · المراقبة · التسليم المستمر مع ضبط التغيير · إقامة البيانات لكل سوق

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الأسئلة الثلاثة لأي مراجعة

  1. Where does card data (PAN) enter and where is it stored? (PCI scope)أين يدخل رقم البطاقة وأين يُخزَّن؟ (نطاق PCI)
  2. Where does money change hands versus where do we only record it? (ledger vs rail)أين ينتقل المال فعلاً مقابل أين نسجّله فقط؟ (الدفتر مقابل النظام)
  3. What happens on a time-out at each arrow? (idempotency, state)ماذا يحدث عند انقضاء المهلة عند كل سهم؟ (عدم التكرار، الحالة)
DevelopersالمطورونBA / PMمحلل / مدير منتجOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.03
The landscapeالمشهد

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.كثيراً ما ترتدي الشركة نفسها عدة قبعات: البنك مُصدر ومستحوذ ومشارك في الدفع الفوري؛ ومقدّم الخدمة بوابة ومنسّق وأحياناً مستحوذ. سمِّ الوظيفة لا الشركة عندما تصمم.

BA / PMمحلل / مدير منتجDevelopersالمطورونOperationsالعمليات
07.04
The landscapeالمشهد

One authorisation through the stack, in millisecondsتفويض واحد عبر الطبقات، في مللي ثوانٍ

Terminal / appالطرفية / التطبيقEMV kernel · PIN pad · SDKنواة EMV · لوحة الرقم السري · حزمة التطويرAcquirer host / PSPمضيف المستحوذ / مقدّم الخدمةTLS · ISO 8583 · fraud pre-checkTLS · ISO 8583 · فحص احتيال أوليNational switch / schemeالمحوّل الوطني / الشبكةmada · GCCNet · Visa · MCمدى · الشبكة الخليجية · فيزا · ماستركاردIssuer hostمضيف المُصدرauth rules · limits · fraud scoreقواعد التفويض · الحدود · تقييم الاحتيالIssuer HSM & coreوحدة الأمان والنظام الأساسي للمُصدرARQC verify · PIN verify · balanceتحقق ARQC · تحقق الرقم السري · الرصيد① 0100 request① طلب 0100② route by BIN / range② التوجيه بحسب BIN / النطاق③ cryptogram + PIN③ التشفير + الرقم السري④ 0110 response with approval code (or decline reason) travels back the same hops — typically well under two seconds end to end④ يعود رد 0110 برمز الموافقة (أو سبب الرفض) عبر القفزات نفسها — عادةً في أقل من ثانيتين من طرف إلى طرف≈ 50–200 ms≈ 50–200 مللي ثانية≈ 20–80 ms≈ 20–80 مللي ثانية≈ 50–300 ms≈ 50–300 مللي ثانية≈ 100–500 ms≈ 100–500 مللي ثانية≈ 10–50 ms≈ 10–50 مللي ثانيةIllustrative per-hop latencies; scheme time-outs and stand-in processing (STIP) apply when an issuer does not answer in time.أزمنة توضيحية لكل قفزة؛ وتنطبق مهل الشبكة والمعالجة البديلة (STIP) عندما لا يرد المُصدر في الوقت.

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.كل سبب رفض يراه عميلك، وكل «معلّق» يطول، وكل نزاع يبدأ بـ«خُصم مني مرتين» يولد على أحد هذه الأسهم. وينبغي أن يستطيع المنتج والعمليات تحديد أيها.

DevelopersالمطورونOperationsالعملياتBA / PMمحلل / مدير منتج
07.05
Integrationالتكامل

Payment APIs: contracts, webhooks and idempotencyواجهات الدفع: العقود والإشعارات وعدم التكرار

Merchant serverخادم التاجرPSP APIواجهة مقدّم الخدمةRail / issuerالنظام / المُصدرPOST /payments · Idempotency-Key: 7f3a…POST /payments · مفتاح عدم التكرار: 7f3a…authoriseتفويضapproved · auth code 019284موافقة · رمز التفويض 019284✖ network time-out — response lost✖ انقطاع الشبكة — ضاع الردretry · same Idempotency-Key: 7f3a…إعادة محاولة · المفتاح نفسه: 7f3a…200 · same payment id · approved (no second charge)200 · معرّف الدفعة نفسه · موافقة (لا خصم ثانٍ)PSP stores key → result for ≥ 24 hيخزّن مقدّم الخدمة المفتاح ← النتيجة ≥ 24 ساعة

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انقضاء المهلة ≠ فشل: استعلم قبل إعادة المحاولة بمفتاح جديد
DevelopersالمطورونBA / PMمحلل / مدير منتجOperationsالعمليات
07.06
Practitionerالممارسة
Integrationالتكامل

Integration patterns and what they cost youأنماط التكامل وما تكلّفك

PatternالنمطHow it worksكيف يعملPCI scopeنطاق PCIControl / 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)حقول مضمّنة / حزمة JavaScriptPSP 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اتصالات دائمة بمحوّل أو نظام؛ رسائل لا RESTFullكامل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، تجربة الموافقة
BA / PMمحلل / مدير منتجDevelopersالمطورونCompliance / Riskالامتثال / المخاطر
07.07
Case scenariosالحالات الدراسية

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
F
Faisal, lead engineer, Sahel Foodsفيصل، كبير المهندسين، سهل فودزInherited a direct-API integration from 2021: card numbers pass through the order service, an annual SAQ D nobody enjoys, and a 'charged twice' complaint every week after app time-outs.ورث تكاملاً بواجهة مباشرة من 2021: تمر أرقام البطاقات عبر خدمة الطلبات، واستبيان SAQ D سنوي لا يحبه أحد، وشكوى «خُصم مني مرتين» كل أسبوع بعد انقضاء مهل التطبيق.
  1. 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؛ ويرفع زر آبل باي وحده تحويل الجوال.
  2. 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 لدى مقدّم الخدمة؛ والبطاقات ثنائية العلامة تذهب افتراضياً إلى مدى داخل المملكة.
  3. 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 في كل دفعة بطاقة؛ سلس عندما يسمح محرك مخاطر المُصدر، وتحدٍّ (رمز لمرة واحدة / موافقة في التطبيق) خلاف ذلك؛ وتتولى الحزمة إطار التحدي لا سهل.
  4. Idempotency. The app creates a payment intent with a UUID before showing the sheet; retries reuse it; the "charged twice" complaints stop.عدم التكرار. ينشئ التطبيق نية دفع بـUUID قبل عرض الصفحة؛ وتعيد المحاولات استخدامه؛ فتتوقف شكاوى «خُصم مني مرتين».
  5. 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)النتائج بعد ربع سنة (توضيحية)

−11 %
checkout abandonment on mobileالتخلي عن الدفع على الجوال
0
duplicate-charge complaints in 90 daysشكاوى الخصم المكرر في 90 يوماً
SAQ A-EP
from SAQ D — audit effort cut by weeksمن SAQ D — تقليص جهد التدقيق بأسابيع

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 التزامات من الشبكة — تحقق منهما في اعتماد الإطلاق.
DevelopersالمطورونBA / PMمحلل / مدير منتجOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.08
Practitionerالممارسة
Case scenariosالحالات الدراسية

Event-driven payments: outbox, queues, exactly-onceالمدفوعات القائمة على الأحداث: الصندوق الصادر والطوابير و«مرة واحدة بالضبط»

Payment serviceخدمة الدفعwrites payment + eventتكتب الدفعة + الحدثOne database transactionمعاملة قاعدة بيانات واحدةpayments table (state = AUTHORISED)جدول الدفعات (الحالة = مفوَّض)outbox table (event: payment.authorised)جدول الصندوق الصادر (حدث: تفويض دفعة)Relay / CDCالمرحّل / التقاط التغييراتpublishes, marks sentينشر ويعلّم كمرسَلLedger consumerمستهلك الدفترposts entries · idempotentيقيّد القيود · غير مكرِّرWebhook dispatcherموزّع الإشعاراتsigns, retries with back-offيوقّع ويعيد المحاولة تدريجياًAnalytics / fraudالتحليلات / الاحتيالat-least-once, dedup by event idمرة على الأقل، إزالة التكرار بمعرّف الحدثWhy: if the service wrote the row and then crashed before publishing,لماذا: إذا كتبت الخدمة الصف ثم انهارت قبل النشر،the event is still in the outbox — nothing is lost, nothing is double-published without a dedup key.يبقى الحدث في الصندوق الصادر — لا يضيع شيء ولا يُنشر مرتين دون مفتاح إزالة تكرار.Consumers must be idempotent: the same event may arrive twice.يجب أن يكون المستهلكون غير مكرِّرين: قد يصل الحدث نفسه مرتين.

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.

DevelopersالمطورونOperationsالعملياتBA / PMمحلل / مدير منتج
07.09
Practitionerالممارسة
Case scenariosالحالات الدراسية

Inside an instant-payment participantداخل مشارك في الدفع الفوري

Participant (bank / licensed PSP)المشارك (بنك / مقدّم خدمة مرخّص)Channelsالقنواتapp · API · branchالتطبيق · الواجهة · الفرعLedger & limitsالدفتر والحدودreserve → post → releaseحجز ← قيد ← تحريرPayment engineمحرك الدفعstate machine · time-outsآلة حالات · مهلLiquidity monitorمراقب السيولةprefunded position 24×7المركز الممول مسبقاً 24×7Sanctions & fraudالعقوبات والاحتيال≤ 300 ms budgetميزانية ≤ 300 مللي ثانيةISO 20022 adapterمحوّل ISO 20022pacs.008 / 002 / 004 · camtpacs.008 / 002 / 004 · camtEvery message is idempotent by MsgId; every state transition is persisted before the next call.كل رسالة غير مكرِّرة بمعرّف MsgId؛ وكل انتقال حالة يُحفظ قبل الاستدعاء التالي.Central infrastructureالبنية التحتية المركزيةSARIE IPS (Saudi Payments)سريع الفوري (المدفوعات السعودية)24×7 · seconds-level SLA · net settlement in RTGS24×7 · اتفاقية بالثواني · تسوية صافية في نظام التسويةpacs.008 →pacs.008 ←← pacs.002 (ACSC / RJCT)pacs.002 (ACSC / RJCT) ←or nothing (time-out)أو لا شيء (انقضاء المهلة)

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 (دورات رواتب مُدد) وأمسيات رمضان — حدد السعة واختبر لتلك الساعات
DevelopersالمطورونOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.10
Practitionerالممارسة
Case scenariosالحالات الدراسية

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المشاركون: بنك النخيل (بنك خيالي مرخّص من ساما، الرياض) · سريع الفوري (المدفوعات السعودية) · عميل يدفع إيجاراً · فريقا هندسة المدفوعات والعمليات في البنك
D
Dana, payments platform engineer, Bank Al Nakheel, Riyadhدانا، مهندسة منصة المدفوعات، بنك النخيل، الرياضSaturday 21:40. A customer sends 3,500 SAR rent via SARIE IPS to his landlord's mobile alias. The bank's adapter sends pacs.008, waits eight seconds, sees no pacs.002, marks the transfer FAILED and releases the reservation. The app shows 'failed'; the customer sends again. Sunday morning: the landlord received 7,000 SAR.السبت 21:40. يرسل عميل 3,500 ريال إيجاراً عبر سريع الفوري إلى الاسم المستعار لجوال المالك. يرسل محوّل البنك pacs.008 وينتظر ثماني ثوانٍ، ولا يرى pacs.002، فيعلّم التحويل فاشلاً ويحرر الحجز. يعرض التطبيق «فشل»؛ فيرسل العميل مجدداً. صباح الأحد: استلم المالك 7,000 ريال.
  1. 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 — بعد أن أعلن المحوّل الفشل بالفعل.
  2. The design flaw. TIMEOUT was mapped to FAILED. In an instant rail, a time-out means unknown: the money may have moved.عيب التصميم. رُبط انقضاء المهلة بالفشل. وفي النظام الفوري يعني انقضاء المهلة مجهول: ربما تحرك المال.
  3. 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 المتأخر، ثم التحرير أو القيد. ويعرض التطبيق «قيد المعالجة — سنؤكد خلال دقائق».
  4. 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.المخاطر: تصميم الحالة المجهولة مسألة حماية مستهلك بقدر ما هو مسألة هندسية.
DevelopersالمطورونOperationsالعملياتBA / PMمحلل / مدير منتجCompliance / Riskالامتثال / المخاطر
07.11
Securityالأمن

Tokenisation: three kinds of tokenالترميز: ثلاثة أنواع من الرموز

PANرقم البطاقة4532 12•• •••• 90104532 12•• •••• 9010Acquirer / PSP tokenرمز المستحوذ / مقدّم الخدمةissued by the PSP vaultيصدره خزنة مقدّم الخدمةscope: that merchant / PSPالنطاق: ذلك التاجر / مقدّم الخدمةfor card-on-file, refundsللبطاقات المحفوظة والاسترداداتPCI scope leaves the merchantيخرج نطاق PCI من التاجرNetwork tokenرمز الشبكةissued by the scheme (VTS / MDES / mada)تصدره الشبكة (VTS / MDES / مدى)bound to device or merchantمرتبط بالجهاز أو التاجرcryptogram per transactionتشفير لكل معاملةlifecycle: card replaced → token updatedدورة الحياة: استبدال البطاقة ← تحديث الرمزWallet / device tokenرمز المحفظة / الجهازApple Pay · Google Pay · mada Payآبل باي · جوجل باي · مدى بايstored in secure element or HCEمخزّن في العنصر الآمن أو HCEEMV contactless or in-appلا تلامسي EMV أو داخل التطبيقissuer approves provisioning (ID&V)يوافق المُصدر على التزويد (التحقق من الهوية)

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صلاحية التشفير لاستخدام واحد وقصيرة؛ لا تخزّن حمولات المحافظ مؤقتاً
DevelopersالمطورونBA / PMمحلل / مدير منتجCompliance / Riskالامتثال / المخاطر
07.12
Practitionerالممارسة
Securityالأمن

Cryptography in payments: HSMs, keys and PIN translationالتشفير في المدفوعات: وحدات الأمان والمفاتيح وترجمة الرقم السري

Key hierarchy (symmetric, inside the HSM)تسلسل المفاتيح (متماثل، داخل وحدة الأمان)LMK — local master keyLMK — المفتاح الرئيسي المحليnever leaves the HSM; encrypts everything belowلا يغادر وحدة الأمان أبداً؛ يشفّر كل ما تحتهZMK / KEK — zone master keyZMK / KEK — مفتاح المنطقة الرئيسيexchanged between two parties under dual controlيُتبادل بين طرفين تحت رقابة مزدوجةZPK / TPK / DUKPT working keysمفاتيح العمل ZPK / TPK / DUKPTencrypt PIN blocks and data per session or per transactionتشفّر كتل الرقم السري والبيانات لكل جلسة أو معاملةPIN translation: terminal key → acquirer key → scheme key → issuer key, never in clearترجمة الرقم السري: مفتاح الطرفية ← مفتاح المستحوذ ← مفتاح الشبكة ← مفتاح المُصدر، دون كشفه أبداًWhat the HSM does for paymentsما تفعله وحدة الأمان للمدفوعاتVerify EMV cryptograms (ARQC) and generate ARPCالتحقق من تشفير EMV (ARQC) وتوليد ARPCVerify PIN offsets / PVV; translate PIN blocksالتحقق من الرقم السري / PVV؛ ترجمة كتل الرقم السريGenerate CVV / CVC2 / iCVV; personalise cardsتوليد CVV / CVC2 / iCVV؛ تخصيص البطاقاتSign 3DS / token cryptograms; TLS private keysتوقيع تشفير 3DS / الرموز؛ مفاتيح TLS الخاصةPCI PIN / PCI HSM certified; dual control, split knowledgeمعتمد وفق PCI PIN / PCI HSM؛ رقابة مزدوجة ومعرفة مقسّمةCloud HSM options must still satisfy residency rulesيجب أن تستوفي خيارات وحدات الأمان السحابية قواعد الإقامة

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?كيف تستوفي وحدة الأمان السحابية قواعد الإقامة داخل البلد؟
DevelopersالمطورونCompliance / Riskالامتثال / المخاطرOperationsالعمليات
07.13
Practitionerالممارسة
Securityالأمن

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 2Merchant'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مفاتيح المرور / FIDO2Phishing-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% من الوقت مشكلة إيراد للتاجر ومشكلة شكاوى للمُصدر ومشكلة انتقال احتيال للجميع.

DevelopersالمطورونBA / PMمحلل / مدير منتجCompliance / Riskالامتثال / المخاطر
07.14
Securityالأمن

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 وأورباي
M
Maha, founder, Khuyut, Jeddahمها، مؤسسة خيوط، جدة60 % of her Instagram orders are cash on delivery; returns and failed deliveries eat margin. She wants prepaid orders without losing customers who hesitate at a card form — and she has one developer.60% من طلبات إنستغرام لديها بالدفع عند الاستلام؛ والمرتجعات والتوصيلات الفاشلة تأكل الهامش. تريد طلبات مدفوعة مسبقاً دون خسارة العملاء الذين يترددون أمام نموذج البطاقة — ولديها مطور واحد.
  1. 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 وأورباي، والدفع الآجل عبر تابي وتمارا — عبر واجهة واحدة وصيغة إشعار واحدة.
  2. 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 رمز لمرة واحدة أو موافقة داخل التطبيق؛ ويهيمن خصم مدى على الإنترنت — فيعرض المطور سبب رفض المُصدر بالعربية بدل «مرفوض» العام.
  3. 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 دقائق وزر «إعادة إرسال الطلب»؛ ويعود رفض تابي إلى نموذج البطاقة.
  4. 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)بعد ثلاثة أشهر (توضيحية)

60 → 37 %
cash on delivery shareحصة الدفع عند الاستلام
≈ 55 %
of prepaid orders via Apple Pay and BNPL, not the card formمن الطلبات المدفوعة مسبقاً عبر آبل باي والدفع الآجل لا نموذج البطاقة
−38 %
failed deliveriesالتوصيلات الفاشلة

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؛ ولا يزال التاجر يملك الاحتيال لدى المتحولين من الدفع عند الاستلام.
BA / PMمحلل / مدير منتجDevelopersالمطورونOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.15
Practitionerالممارسة
Platformالمنصة

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.السحابة مسموحة في المملكة للمدفوعات المنظَّمة — بعدم ممانعة وتصنيف وإقامة داخل المملكة. والخطأ هو افتراض أن شهادة المزود هي موافقتك.

DevelopersالمطورونCompliance / Riskالامتثال / المخاطرOperationsالعملياتBA / PMمحلل / مدير منتج
07.16
Practitionerالممارسة
Platformالمنصة

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تدهور مزود SMS3DS challenge success collapsesانهيار نجاح تحدي 3DSSecond SMS route; push to in-app approval; issuer risk-based exemptionsمسار SMS ثانٍ؛ التحول إلى الموافقة داخل التطبيق؛ إعفاءات المُصدر القائمة على المخاطر
Instant rail unreachableتعذر الوصول إلى النظام الفوريTransfers stuck in SENT / TIMEOUTتحويلات عالقة في SENT / TIMEOUTINVESTIGATE state, customer messaging, operator incident channel, no auto-retryحالة INVESTIGATE، رسائل للعملاء، قناة حوادث المشغّل، لا إعادة محاولة تلقائية
DevelopersالمطورونOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.17
Practitionerالممارسة
Platformالمنصة

Scalability and the latency budgetقابلية التوسع وميزانية زمن الاستجابة

40403030Fraud / risk scoreتقييم الاحتيال150 ms150 مللي ثانية4040Switch / scheme hopقفزة المحوّل / الشبكة200 ms200 مللي ثانيةIssuer decisionقرار المُصدر400 ms400 مللي ثانيةLedger + responseالدفتر + الرد60 ms60 مللي ثانيةIllustrative p50 budget for one online card authorisation ≈ 920 ms — where would you spend the next 100 ms?ميزانية توضيحية (الوسيط) لتفويض بطاقة واحد عبر الإنترنت ≈ 920 مللي ثانية — أين ستنفق المئة مللي ثانية التالية؟The parts you control are small; the hops you do not control dominate. Time-outs must be set per hop, and every hop must be traceable by one correlation id.الأجزاء التي تتحكم بها صغيرة؛ والقفزات التي لا تتحكم بها تهيمن. يجب ضبط المهل لكل قفزة، وتتبع كل قفزة بمعرّف ارتباط واحد.Targets teams commonly set: p50 < 1 s, p99 < 3 s for card authorisation; instant transfers < 5–10 s end to end (scheme rules bind the participant).أهداف تضعها الفرق عادةً: الوسيط < 1 ثانية والمئين 99 < 3 ثوانٍ لتفويض البطاقات؛ والتحويلات الفورية < 5–10 ثوانٍ من طرف إلى طرف (قواعد النظام تلزم المشارك).Peak multipliers to plan for in the Kingdom: salary days around the 27th (Mudad payroll runs), Ramadan evenings, White Friday / 11.11, Eid, Hajj and Umrah seasons, school-fee weeks.مضاعفات الذروة التي يجب التخطيط لها في المملكة: أيام الرواتب حول يوم 27 (دورات رواتب مُدد)، أمسيات رمضان، الجمعة البيضاء / 11.11، العيد، موسما الحج والعمرة، أسابيع الرسوم المدرسية.

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 ومعدل الموافقة، لكل نظام، لكل ساعة. إذا تحرك أيهما، ينبغي استدعاء أحدهم قبل أن يغرّد عميل. وكل شيء آخر على لوحة المتابعة سياق.

DevelopersالمطورونOperationsالعملياتBA / PMمحلل / مدير منتج
07.18
Practitionerالممارسة
Platformالمنصة

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 والمُصدر وفئة التاجر ونتيجة 3DSDrops > 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.تقرأ لوحة متابعة المدفوعات أربع فئات: المهندسون (زمن الاستجابة)، والمنتج (التحويل)، والعمليات (المجهولات والفروقات)، والامتثال (الحوادث). ابنِها مرة واحدة بأربعة عروض للأحداث نفسها.

OperationsالعملياتDevelopersالمطورونBA / PMمحلل / مدير منتجCompliance / Riskالامتثال / المخاطر
07.19
Practitionerالممارسة
Platformالمنصة

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 مليون عميل) · مقدّما خدمة (رئيسي وثانوي) · مدى وآبل باي · تابي (الدفع الآجل) · سريع الفوري لدفعات البائعين · فريق موثوقية المنصة
O
Omar, SRE lead, Gulf Star Market, Riyadhعمر، قائد فريق الموثوقية، جلف ستار ماركت، الرياضLast year's White Friday: 9× normal traffic at 20:00, primary PSP p99 went from 900 ms to 6 s, checkout time-outs cascaded into retries, and the ledger database hit lock contention on the marketplace payable account. Two hours of degraded checkout.الجمعة البيضاء الماضية: 9 أضعاف الحركة العادية عند 20:00، وارتفع المئين 99 لمقدّم الخدمة الرئيسي من 900 مللي ثانية إلى 6 ثوانٍ، وتسلسلت مهل الدفع إلى إعادة محاولات، وضربت قاعدة الدفتر تنافس الأقفال على حساب مستحقات السوق. ساعتان من الدفع المتدهور.
  1. Model. Forecast 12× peak; load-test at 25× on a production-like environment with PSP sandboxes; find the ledger hot row.النمذجة. توقع ذروة 12 ضعفاً؛ اختبار الحمل عند 25 ضعفاً في بيئة شبيهة بالإنتاج مع بيئات اختبار مقدّمي الخدمة؛ العثور على الصف الساخن في الدفتر.
  2. Ledger. Replace the single payable balance row with per-order postings aggregated every minute; write contention disappears.الدفتر. استبدال صف الرصيد المستحق الواحد بقيود لكل طلب تُجمَّع كل دقيقة؛ فيختفي تنافس الكتابة.
  3. 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 ثانية، تذهب دفعات البطاقات الجديدة إلى ب؛ ورموز المحافظ رموز شبكة فتعمل على كليهما.
  4. 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 مللي ثانية وبديل «قيّم لاحقاً» للسلال منخفضة القيمة.
  5. Payouts. Seller payouts via SARIE IPS are moved off the peak window and batched with limits per minute.الدفعات الصادرة. تُنقل دفعات البائعين عبر سريع الفوري خارج نافذة الذروة وتُجمَّع بحدود لكل دقيقة.

White Friday, this year (illustrative)الجمعة البيضاء هذا العام (توضيحية)

11.4×
peak vs normal hourالذروة مقابل الساعة العادية
1.3 s
checkout p99 at peak (from 6 s)المئين 99 للدفع عند الذروة (من 6 ثوانٍ)
22 min
on PSP-B while PSP-A degradedعلى مقدّم الخدمة ب أثناء تدهور أ

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 نفسها كالأول.
DevelopersالمطورونOperationsالعملياتBA / PMمحلل / مدير منتجCompliance / Riskالامتثال / المخاطر
07.20
Practitionerالممارسة
Platformالمنصة

Ledgers, event logs and reconciliation technologyالدفاتر وسجلات الأحداث وتقنية المطابقة

Append-only event log (source of truth)سجل أحداث للإلحاق فقط (مصدر الحقيقة)#1041 payment.created#1041 إنشاء الدفعةimmutable · timestamped · hashedثابت · مختوم زمنياً · مجزّأ#1042 payment.authorised#1042 تفويض الدفعةimmutable · timestamped · hashedثابت · مختوم زمنياً · مجزّأ#1043 payment.captured#1043 تحصيل الدفعةimmutable · timestamped · hashedثابت · مختوم زمنياً · مجزّأ#1044 settlement.received#1044 استلام التسويةimmutable · timestamped · hashedثابت · مختوم زمنياً · مجزّأ#1045 refund.issued#1045 إصدار استردادimmutable · timestamped · hashedثابت · مختوم زمنياً · مجزّأDouble-entry ledger (derived view)دفتر القيد المزدوج (عرض مشتق)AccountالحسابDebitمدينCreditدائنCustomer receivableذمم العميل1,150.001,150.00Merchant payableمستحقات التاجر1,117.751,117.75Fee revenueإيراد الرسوم32.2532.25Scheme settlement (nostro)تسوية الشبكة (حساب التسوية)1,150.001,150.00Customer receivable (cleared)ذمم العميل (مسوّاة)1,150.001,150.00Debits = credits on every posting; balances are recomputed from events in a rebuild — never edited in place.المدين = الدائن في كل قيد؛ وتُعاد الأرصدة من الأحداث عند إعادة البناء — ولا تُعدَّل في مكانها أبداً.

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الاحتفاظ والحذف لكل حقل ولكل سوق
DevelopersالمطورونOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.21
Platformالمنصة

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 / SPoCOffered 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عالج «لم يعد المستخدم»: انتهاء + استعلام الحالة
DevelopersالمطورونBA / PMمحلل / مدير منتجOperationsالعمليات
07.22
Practitionerالممارسة
Platformالمنصة

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 بائع في الأسواق وشاحنات الطعام
H
Hessa, product manager, Tamr Tech, Jeddahحصة، مديرة منتج، تمر تك، جدةVendors will not pay for a terminal or wait a week for one. They have Android phones. She wants same-day onboarding, tap acceptance on the phone, and payouts the vendor can see by evening.لن يدفع الباعة ثمن طرفية أو ينتظروا أسبوعاً للحصول عليها. لديهم هواتف أندرويد. تريد تسجيلاً في اليوم نفسه، وقبولاً باللمس على الهاتف، ودفعات يراها البائع بحلول المساء.
  1. 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؛ ويعتمد المستحوذ الراعي الحل مع مدى والشبكات.
  2. Onboarding. Nafath-based eKYC, commercial-registration or freelancer-licence lookup, MCC assignment, risk tier with limits — in eleven minutes on the phone.التسجيل. اعرف عميلك إلكترونياً عبر نفاذ، والبحث في السجل التجاري أو رخصة العمل الحر، وتعيين رمز فئة التاجر، ومستوى مخاطر بحدود — في إحدى عشرة دقيقة على الهاتف.
  3. 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، لا رقم بطاقة على الجهاز أبداً، وحدود للمعاملات حتى يتكوّن تاريخ البائع.
  4. Offline. Store-and-forward for up to five transactions under a small cap when connectivity drops in covered markets; flagged as offline in recon.دون اتصال. تخزين ثم إرسال لخمس معاملات على الأكثر تحت سقف صغير عند انقطاع الاتصال في الأسواق المسقوفة؛ وتُعلَّم كغير متصلة في المطابقة.
  5. 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.المخاطر: احتيال صغار التجار (باعة وهميون يصرفون بطاقات مسروقة) هو التهديد الرئيسي — حدود وقواعد سرعة منذ اليوم الأول.
BA / PMمحلل / مدير منتجDevelopersالمطورونOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.23
Practitionerالممارسة
Platformالمنصة

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?ما وضع الإقامة وموافقة الجهة التنظيمية للمورد نفسه في كل سوق؟
BA / PMمحلل / مدير منتجDevelopersالمطورونCompliance / Riskالامتثال / المخاطر
07.24
Practitionerالممارسة
Platformالمنصة

Delivery: secure SDLC, certification and change controlالتسليم: دورة تطوير آمنة واعتماد وضبط تغيير

Designالتصميمthreat model · data mapنمذجة التهديدات · خريطة البياناتCodeالشفرةSAST · secrets scanتحليل ثابت · فحص الأسرارpeer reviewمراجعة الأقرانTestالاختبارunit · contractوحدات · عقودgolden filesملفات مرجعيةCertifyالاعتمادscheme sandbox · EMV L3بيئة الشبكة · EMV L3rail conformanceمطابقة النظامReleaseالإصدارchange record · canaryسجل التغيير · إصدار تجريبيrollback planخطة تراجعOperateالتشغيلmonitor · incidentمراقبة · حوادثpost-mortemمراجعة لاحقةgate: PCI secure-software req.بوابة: متطلبات PCI للبرمجيات الآمنةgate: regulator / scheme sign-offبوابة: اعتماد الجهة التنظيمية / الشبكةgate: change approval (CAB)بوابة: موافقة التغييرRegulators expect segregation of duties (developer ≠ deployer), an audit trail per change, and evidence that production data never enters test environments.تتوقع الجهات التنظيمية فصل المهام (المطور ≠ الناشر)، وسجل تدقيق لكل تغيير، ودليلاً على أن بيانات الإنتاج لا تدخل بيئات الاختبار أبداً.

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?أي اعتمادات الشبكات سارية ومتى تنتهي؟
DevelopersالمطورونOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.25
Expertالإتقان
Platformالمنصة

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ساما مقيِّدة لمدفوعات الأصول الرقمية؛ لا نظام عملات مستقرة مرخّصاً في المملكة؛ والبنوك محذَّرة من تدفقات الأصول الرقمية — انظر الفصل 10Treat 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اجرد كل خوارزمية ومفتاح؛ واجعل التدوير روتينياً الآن
DevelopersالمطورونBA / PMمحلل / مدير منتجCompliance / Riskالامتثال / المخاطر
07.26
Your roleدورك

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بوابات الخط، سجلات التغيير، تقويم الاعتماد
BA / PMمحلل / مدير منتجOperationsالعملياتDevelopersالمطورونCompliance / Riskالامتثال / المخاطر
07.27
Practitionerالممارسة
Your roleدورك

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 تجعله شهوراً — خطط لذلك.

BA / PMمحلل / مدير منتجOperationsالعملياتDevelopersالمطورونCompliance / Riskالامتثال / المخاطر
07.28
Reference & practiceالمرجع والتطبيق

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.هيكل حسابات سحابية معتمد مسبقاً بضوابط الشبكات والهوية والتسجيل والإقامة.
BA / PMمحلل / مدير منتجOperationsالعملياتDevelopersالمطورونCompliance / Riskالامتثال / المخاطر
07.29
Reference & practiceالمرجع والتطبيق

Knowledge checkاختبار الفهم

Ten questions. Click an answer to see immediate feedback; your score appears after the last one.عشرة أسئلة. انقر على إجابة لترى التغذية الراجعة فوراً؛ وتظهر نتيجتك بعد السؤال الأخير.

1. Sahel Foods moved from a direct API to hosted fields plus Apple Pay. What was the main PCI effect?انتقلت سهل فودز من واجهة مباشرة إلى حقول مستضافة مع آبل باي. ما الأثر الرئيسي على PCI؟
Scope follows the PAN. Hosted fields and wallet tokens keep it inside the PSP and the scheme.يتبع النطاق رقم البطاقة. وتبقيه الحقول المستضافة ورموز المحافظ داخل مقدّم الخدمة والشبكة.
2. A merchant's request times out after the PSP has actually authorised the payment. The correct client behaviour is:انقضت مهلة طلب التاجر بعد أن فوّض مقدّم الخدمة الدفعة فعلاً. السلوك الصحيح للعميل هو:
The same key returns the original result; the customer is never charged twice.يعيد المفتاح نفسه النتيجة الأصلية؛ ولا يُخصم من العميل مرتين أبداً.
3. In Case 2, why did Bank Al Nakheel's customer end up paying 7,000 SAR?في الحالة 2، لماذا انتهى عميل بنك النخيل بدفع 7,000 ريال؟
Time-out means unknown. Keep the reservation, query the status, then post or release.انقضاء المهلة يعني مجهول. أبقِ الحجز، واستعلم عن الحالة، ثم قيّد أو حرر.
4. Which token is issued by the scheme, bound to a device or merchant and updated automatically when the card is reissued?أي رمز تصدره الشبكة ويرتبط بجهاز أو تاجر ويتحدث تلقائياً عند إعادة إصدار البطاقة؟
Network tokens (VTS, MDES, mada) carry lifecycle management and per-transaction cryptograms; PSP tokens are scoped to that PSP.تحمل رموز الشبكة (VTS، MDES، مدى) إدارة دورة الحياة وتشفيراً لكل معاملة؛ أما رموز مقدّم الخدمة فمحدودة بذلك المقدّم.
5. What does a payment HSM do that application code must never do?ما الذي تفعله وحدة أمان المدفوعات ولا يجوز لشفرة التطبيق فعله أبداً؟
Keys never leave the HSM in clear; PINs are translated from one zone key to the next inside it.لا تغادر المفاتيح وحدة الأمان واضحة أبداً؛ وتُترجم الأرقام السرية من مفتاح منطقة إلى التالي داخلها.
6. Which statement about hosting regulated payment workloads in the Kingdom is accurate?أي عبارة عن استضافة أعمال الدفع المنظَّمة في المملكة دقيقة؟
SAMA allows cloud under conditions — non-objection, classification, in-Kingdom residency; the approval is yours to evidence.تسمح ساما بالسحابة بشروط — عدم ممانعة وتصنيف وإقامة داخل المملكة؛ والموافقة عليك إثباتها.
7. Gulf Star Market's ledger failed on peak day because:فشل دفتر جلف ستار ماركت يوم الذروة لأن:
Per-transaction postings aggregated later remove the hot row; balances are derived, not updated in place.تزيل القيود لكل معاملة المجمَّعة لاحقاً الصف الساخن؛ والأرصدة مشتقة لا تُحدَّث في مكانها.
8. The two numbers a payments team should publish per rail and per hour are:الرقمان اللذان ينبغي لفريق المدفوعات نشرهما لكل نظام ولكل ساعة هما:
Averages hide peak pain; totals hide a failing issuer. p99 and approval rate move when customers suffer.تخفي المتوسطات ألم الذروة؛ وتخفي المجاميع مُصدراً فاشلاً. ويتحرك المئين 99 ومعدل الموافقة عندما يعاني العملاء.
9. Which standard governs SoftPOS (tap-to-phone) acceptance on ordinary smartphones?أي معيار يحكم قبول نقاط البيع البرمجية (اللمس على الهاتف) على الهواتف الذكية العادية؟
MPoC (2022→) replaced CPoC/SPoC and covers the SDK, attestation and monitoring service; PCI DSS still applies to the back end.حل MPoC (2022←) محل CPoC/SPoC ويغطي الحزمة والتصديق وخدمة المراقبة؛ ولا يزال PCI DSS ينطبق على الأنظمة الخلفية.
10. What is the transactional outbox pattern for?لماذا يُستخدم نمط الصندوق الصادر المعاملاتي؟
Event and state in one transaction; a relay publishes; consumers de-duplicate by event id.الحدث والحالة في معاملة واحدة؛ ينشر المرحّل؛ ويزيل المستهلكون التكرار بمعرّف الحدث.
07.30
Practitionerالممارسة
Reference & practiceالمرجع والتطبيق

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لوحة المتابعة: البلاطات الأربع التي ستضعها على الجدار
DevelopersالمطورونBA / PMمحلل / مدير منتجOperationsالعملياتCompliance / Riskالامتثال / المخاطر
07.31
Reference & practiceالمرجع والتطبيق

Summary and what comes nextالخلاصة وما التالي

Seven things to carry forwardسبعة أمور تحملها معك

  1. Five layers — channels, edge, orchestration, core, connectors — and three review questions: where is PAN, where does money move, what happens on time-out.خمس طبقات — القنوات والحافة والتنسيق والأساسية والموصّلات — وثلاثة أسئلة للمراجعة: أين رقم البطاقة، وأين يتحرك المال، وماذا يحدث عند انقضاء المهلة.
  2. Integration pattern decides PCI scope, conversion and latency; hosted fields plus wallets is the default for merchants.يحدد نمط التكامل نطاق PCI والتحويل وزمن الاستجابة؛ والحقول المستضافة مع المحافظ هي الافتراضي للتجار.
  3. Idempotency keys, outbox events and an explicit unknown state are how payments survive retries and time-outs.مفاتيح عدم التكرار وأحداث الصندوق الصادر وحالة مجهولة صريحة هي كيف تصمد المدفوعات أمام إعادة المحاولة وانقضاء المهل.
  4. Tokens move PAN out of your systems; HSMs keep keys and PINs out of your code.تنقل الرموز رقم البطاقة خارج أنظمتك؛ وتبقي وحدات الأمان المفاتيح والأرقام السرية خارج شفرتك.
  5. Instant-payment participation means 24×7, seconds-level SLAs, liquidity monitoring and intraday reconciliation.تعني المشاركة في الدفع الفوري 24×7 واتفاقيات بالثواني ومراقبة السيولة ومطابقة خلال اليوم.
  6. Cloud is allowed with approval and residency; resilience and capacity are planned around regional peaks and tested before them.السحابة مسموحة بموافقة وإقامة؛ والمرونة والسعة تُخطَّطان حول الذروات الإقليمية وتُختبران قبلها.
  7. 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). أرقام زمن الاستجابة ومضاعفات الذروة ونتائج الحالات توضيحية؛ والشركات والأشخاص في الحالات خياليون.

BA / PMمحلل / مدير منتجOperationsالعملياتDevelopersالمطورونCompliance / Riskالامتثال / المخاطر
07.32