{
  "_doc": "One entry per payment outcome. Texts are DEFAULTS (Egyptian Arabic, feminine address) — the dashboard overrides them via app-texts; placeholders: {order_number} {amount} {eta} {last4} {payment_ref} {phone_masked}.",
  "states": {
    "card": {
      "group": "success",
      "label_ar": "كارت",
      "title_ar": "الأوردر اتأكد 🎉",
      "body_ar": "رقم الأوردر {order_number}. الدفع اتم بنجاح وهيوصلك في {eta}. بعتنالك الفاتورة على واتساب والإيميل.",
      "reasons_ar": [],
      "support_code": null,
      "payment_row": {
        "method_ar": "كارت بنك",
        "detail_ar": "اتدفع · {amount} ج.م · •••• {last4}"
      },
      "progress": "order_flow",
      "panel": null,
      "document": {
        "mode": "paid",
        "note": "final paid invoice issued immediately"
      },
      "summary_box": "order_summary",
      "ctas": [
        "dl",
        "track",
        "shop"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/done",
      "ops": {
        "customer_sees": "الأوردر اتأكد + ملخص + زرار الفاتورة",
        "invoice": "فاتورة مدفوعة (PDF) — تتصدر فورًا",
        "dashboard": "مدفوع · بيتجهز",
        "notification": "تأكيد + الفاتورة مرفقة"
      }
    },
    "apple": {
      "group": "success",
      "label_ar": "Apple Pay",
      "title_ar": "الأوردر اتأكد 🎉",
      "body_ar": "رقم الأوردر {order_number}. اتدفع بالـ Face ID وهيوصلك في {eta}.",
      "reasons_ar": [],
      "support_code": null,
      "payment_row": {
        "method_ar": "Apple Pay",
        "detail_ar": "اتدفع · {amount} ج.م · Face ID"
      },
      "progress": "order_flow",
      "panel": null,
      "document": {
        "mode": "paid",
        "note": "final paid invoice issued immediately"
      },
      "summary_box": "order_summary",
      "ctas": [
        "dl",
        "track",
        "shop"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/done",
      "ops": {
        "customer_sees": "نفس شاشة الكارت (بدون آخر 4 أرقام)",
        "invoice": "فاتورة مدفوعة — طريقة الدفع Apple Pay",
        "dashboard": "مدفوع · بيتجهز",
        "notification": "تأكيد + الفاتورة مرفقة"
      }
    },
    "walletp": {
      "group": "success",
      "label_ar": "محفظة (اتأكدت)",
      "title_ar": "الأوردر اتأكد 🎉",
      "body_ar": "وافقتي على الدفع من المحفظة. رقم الأوردر {order_number} وهيوصلك في {eta}.",
      "reasons_ar": [],
      "support_code": null,
      "payment_row": {
        "method_ar": "محفظة إلكترونية",
        "detail_ar": "اتدفع · {amount} ج.م · {phone_masked}"
      },
      "progress": "order_flow",
      "panel": null,
      "document": {
        "mode": "paid",
        "note": "final paid invoice issued immediately"
      },
      "summary_box": "order_summary",
      "ctas": [
        "dl",
        "track",
        "shop"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/done",
      "ops": {
        "customer_sees": "الأوردر اتأكد بعد موافقة المحفظة",
        "invoice": "فاتورة مدفوعة — محفظة",
        "dashboard": "مدفوع · بيتجهز",
        "notification": "تأكيد + الفاتورة مرفقة"
      }
    },
    "cod": {
      "group": "success",
      "label_ar": "كاش عند الاستلام",
      "title_ar": "الأوردر اتأكد 🎉",
      "body_ar": "رقم الأوردر {order_number}. هتدفعي {amount} ج.م للمندوب لما يوصلك. المندوب هيكلمك قبل الوصول.",
      "reasons_ar": [],
      "support_code": null,
      "payment_row": {
        "method_ar": "كاش عند الاستلام",
        "detail_ar": "هتدفعي {amount} ج.م للمندوب"
      },
      "progress": "order_flow",
      "panel": null,
      "document": {
        "mode": "cod",
        "note": "invoice marked due on delivery; becomes paid after collection"
      },
      "summary_box": "order_summary",
      "ctas": [
        "dl",
        "track",
        "shop"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/done",
      "ops": {
        "customer_sees": "الأوردر اتأكد + المبلغ اللي هتدفعيه للمندوب",
        "invoice": "فاتورة «مستحقة عند الاستلام» — بتتحوّل لمدفوعة بعد التحصيل",
        "dashboard": "مؤكد بالتليفون · COD",
        "notification": "تأكيد + الفاتورة + المبلغ المستحق"
      }
    },
    "insta": {
      "group": "pending",
      "label_ar": "InstaPay مستني التحويل",
      "title_ar": "استلمنا الأوردر ⏳",
      "body_ar": "أوردرك {order_number} محجوز لحد ما التحويل يوصلنا. أول ما نتأكد هنصدر الفاتورة ونبعتهالك.",
      "reasons_ar": [],
      "support_code": null,
      "payment_row": {
        "method_ar": "InstaPay",
        "detail_ar": "مستني التحويل · {amount} ج.م"
      },
      "progress": "awaiting_confirmation",
      "panel": "insta",
      "document": {
        "mode": "proforma",
        "note": "proforma only (no QR) until transfer is confirmed"
      },
      "summary_box": "order_summary",
      "ctas": [
        "instaok",
        "upload",
        "chg"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/pending?m=instapay",
      "ops": {
        "customer_sees": "بيانات التحويل + عدّاد الحجز + رفع الإيصال",
        "invoice": "فاتورة مبدئية (Proforma) — الفاتورة النهائية بعد التأكيد",
        "dashboard": "بانتظار الدفع · محجوز ساعتين",
        "notification": "بيانات التحويل + فاتورة مبدئية"
      }
    },
    "walletw": {
      "group": "pending",
      "label_ar": "محفظة مستني الموافقة",
      "title_ar": "مستنيين موافقتك من المحفظة",
      "body_ar": "بعتنا طلب دفع على موبايلك. وافقي عليه برقمك السري علشان الأوردر يتأكد.",
      "reasons_ar": [],
      "support_code": null,
      "payment_row": {
        "method_ar": "محفظة إلكترونية",
        "detail_ar": "طلب دفع على {phone_masked} · {amount} ج.م"
      },
      "progress": "awaiting_confirmation",
      "panel": "wallet",
      "document": {
        "mode": "later",
        "note": "issued after payment confirmation"
      },
      "summary_box": "order_summary",
      "ctas": [
        "walletok",
        "resend",
        "chg"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/pending?m=wallet",
      "ops": {
        "customer_sees": "3 خطوات + عدّاد 5 دقايق + إعادة إرسال الطلب",
        "invoice": "لسه — بتتصدر بعد الموافقة",
        "dashboard": "بانتظار الدفع · 5 دقايق",
        "notification": "تنبيه «وافقي من المحفظة»"
      }
    },
    "declined": {
      "group": "failed",
      "label_ar": "رفض البنك",
      "title_ar": "الدفع ماتمّش",
      "body_ar": "البنك رفض العملية. متقلقيش، مفيش فلوس اتخصمت وشنطتك زي ما هي.",
      "reasons_ar": [
        "اتأكدي من رقم الكارت وتاريخ الانتهاء والـ CVV",
        "ممكن حد الشراء أونلاين مش كفاية",
        "بعض البنوك محتاجة تفعيل الدفع أونلاين من التطبيق"
      ],
      "support_code": "05 · Do not honor",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "retry",
        "alt",
        "wa"
      ],
      "alternative_methods": [
        "card",
        "wallet",
        "cod"
      ],
      "url_pattern": "/checkout/failed?reason=declined",
      "ops": {
        "customer_sees": "سبب واضح + «مفيش خصم» + جرّبي تاني + بدائل",
        "invoice": "مفيش فاتورة (مفيش مبلغ اتحاسب)",
        "dashboard": "لا أوردر — محاولة فاشلة في «المدفوعات الفاشلة»",
        "notification": "رسالة «الدفع ماتمّش» + لينك للشنطة"
      }
    },
    "funds": {
      "group": "failed",
      "label_ar": "رصيد مش كفاية",
      "title_ar": "الرصيد مش كفاية",
      "body_ar": "البنك رفض العملية لأن الرصيد أو الحد المتاح مش كفاية. مفيش فلوس اتخصمت.",
      "reasons_ar": [
        "اشحني الكارت أو جربي كارت تاني",
        "ادفعي بالمحفظة أو كاش عند الاستلام",
        "ممكن تقسمي الأوردر على أكتر من عملية شراء"
      ],
      "support_code": "51 · Insufficient funds",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "retry",
        "alt",
        "wa"
      ],
      "alternative_methods": [
        "card",
        "wallet",
        "cod"
      ],
      "url_pattern": "/checkout/failed?reason=funds",
      "ops": {
        "customer_sees": "نفس الفشل مع نصيحة الرصيد + بدائل",
        "invoice": "مفيش فاتورة",
        "dashboard": "محاولة فاشلة (51)",
        "notification": "رسالة فشل + بدائل"
      }
    },
    "tds": {
      "group": "failed",
      "label_ar": "فشل 3-D Secure",
      "title_ar": "التأكيد من البنك ماكملش",
      "body_ar": "كود التأكيد (3-D Secure) كان غلط أو انتهت صلاحيته. مفيش فلوس اتخصمت.",
      "reasons_ar": [
        "الكود صالح 5 دقايق بس",
        "اتأكدي إن رقم الموبايل المسجل في البنك شغال",
        "اطلبي كود جديد وجربي تاني"
      ],
      "support_code": "3DS · Authentication failed",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "retry",
        "alt",
        "wa"
      ],
      "alternative_methods": [
        "card",
        "wallet",
        "cod"
      ],
      "url_pattern": "/checkout/failed?reason=3ds",
      "ops": {
        "customer_sees": "شرح الكود وصلاحيته + جرّبي تاني",
        "invoice": "مفيش فاتورة",
        "dashboard": "محاولة فاشلة (3DS)",
        "notification": "رسالة فشل"
      }
    },
    "cancelled": {
      "group": "failed",
      "label_ar": "الدفع اتلغى",
      "title_ar": "الدفع اتلغى",
      "body_ar": "قفلتي صفحة الدفع قبل ما العملية تخلص. مفيش فلوس اتخصمت وشنطتك محفوظة.",
      "reasons_ar": [
        "كملي من نفس النقطة وقت ما تحبي",
        "لو قفلتيها بالغلط اضغطي «جربي تاني»"
      ],
      "support_code": "USER_CANCELLED",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "retry",
        "alt",
        "wa"
      ],
      "alternative_methods": [
        "card",
        "wallet",
        "cod"
      ],
      "url_pattern": "/checkout/failed?reason=cancelled",
      "ops": {
        "customer_sees": "رسالة ودودة + كملي الدفع",
        "invoice": "مفيش فاتورة",
        "dashboard": "سلة متروكة — بتظهر في «السلات المتروكة»",
        "notification": "تذكير بعد ساعة (اختياري)"
      }
    },
    "session": {
      "group": "failed",
      "label_ar": "الجلسة خلصت",
      "title_ar": "الجلسة خلصت",
      "body_ar": "فضلتي وقت طويل على صفحة الدفع فاتقفلت لأمانك. مفيش فلوس اتخصمت.",
      "reasons_ar": [
        "ارجعي للشنطة وكمّلي من تاني",
        "بيانات الكارت مش بتتحفظ عندنا — هتحتاجي تكتبيها تاني"
      ],
      "support_code": "SESSION_TIMEOUT",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "cart",
        "alt",
        "wa"
      ],
      "alternative_methods": [
        "card",
        "wallet",
        "cod"
      ],
      "url_pattern": "/checkout/failed?reason=timeout",
      "ops": {
        "customer_sees": "الجلسة خلصت + ارجعي للشنطة",
        "invoice": "مفيش فاتورة",
        "dashboard": "محاولة منتهية",
        "notification": "—"
      }
    },
    "reserve": {
      "group": "failed",
      "label_ar": "انتهى الحجز (InstaPay)",
      "title_ar": "الأوردر اتلغى لأن الحجز خلص",
      "body_ar": "ماوصلناش تحويل خلال ساعتين فالأوردر {order_number} اتلغى. لو حوّلتي فعلًا ابعتيلنا الإيصال وهنفعّله.",
      "reasons_ar": [
        "الشنطة رجعت زي ما كانت",
        "الأسعار والمخزون ممكن يكونوا اتغيروا",
        "لو الفلوس اتحولت هنرجعها أو نفعّل الأوردر حسب الإيصال"
      ],
      "support_code": "RESERVATION_EXPIRED",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "cart",
        "upload",
        "wa"
      ],
      "alternative_methods": [],
      "url_pattern": "/orders/TNG-24098",
      "ops": {
        "customer_sees": "الأوردر اتلغى + رفع الإيصال لو حوّلتي",
        "invoice": "الفاتورة المبدئية بتتلغي (بدون إشعار دائن)",
        "dashboard": "ملغي · انتهى الحجز",
        "notification": "رسالة إلغاء + طريقة التفعيل"
      }
    },
    "tech": {
      "group": "failed",
      "label_ar": "مشكلة تقنية",
      "title_ar": "حصلت مشكلة عندنا",
      "body_ar": "ماقدرناش نوصل لبوابة الدفع دلوقتي. ده من عندنا مش منك. جربي كمان دقايق أو اختاري طريقة تانية.",
      "reasons_ar": [
        "ماتكرريش المحاولة أكتر من مرة بسرعة",
        "لو ظهرلك خصم من البنك ابعتيلنا الكود تحت",
        "كاش عند الاستلام شغال دلوقتي كبديل"
      ],
      "support_code": "GW-503 · Gateway unavailable",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "retry",
        "alt",
        "wa"
      ],
      "alternative_methods": [
        "wallet",
        "cod"
      ],
      "url_pattern": "/checkout/failed?reason=gateway",
      "ops": {
        "customer_sees": "اعتذار + مش غلطك + بدائل",
        "invoice": "مفيش فاتورة",
        "dashboard": "تنبيه فني (GW-503) للفريق",
        "notification": "رسالة اعتذار"
      }
    },
    "stock": {
      "group": "failed",
      "label_ar": "منتج خلص أثناء الدفع",
      "title_ar": "منتج في شنطتك خلص",
      "body_ar": "واحد من المنتجات خلص قبل ما نكمل الدفع. مفيش فلوس اتخصمت، عدّلي الشنطة وكمّلي.",
      "reasons_ar": [
        "كمّلي من غير المنتج ده",
        "أو بلّغونا لما يرجع وهنبعتلك على واتساب"
      ],
      "support_code": "OUT_OF_STOCK · rose_wash",
      "payment_row": null,
      "progress": null,
      "panel": null,
      "document": {
        "mode": "none",
        "note": "no document — nothing was charged"
      },
      "summary_box": "saved_bag",
      "ctas": [
        "fixbag",
        "notify",
        "wa"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/failed?reason=stock",
      "ops": {
        "customer_sees": "المنتج المتأثر متعلّم + عدّلي الشنطة",
        "invoice": "مفيش فاتورة",
        "dashboard": "تنبيه مخزون + عملية ما اتأكدتش",
        "notification": "رسالة «المنتج خلص»"
      }
    },
    "review": {
      "group": "needs_review",
      "label_ar": "اتخصم ومحتاج مراجعة",
      "title_ar": "بنراجع عملية الدفع",
      "body_ar": "ماوصلناش تأكيد نهائي من البنك. لو الفلوس اتخصمت هترجعلك تلقائيًا خلال {eta}. ما تدفعيش تاني دلوقتي، هنبعتلك على واتساب خلال ساعة.",
      "reasons_ar": [],
      "support_code": "{payment_ref}",
      "payment_row": null,
      "progress": null,
      "panel": "review",
      "document": {
        "mode": "hold",
        "note": "not issued until payment is confirmed; credit note if refunded"
      },
      "summary_box": "order_summary",
      "ctas": [
        "wa",
        "track"
      ],
      "alternative_methods": [],
      "url_pattern": "/checkout/verifying",
      "ops": {
        "customer_sees": "«بنراجع» + كود المرجع + مفيش دفع تاني",
        "invoice": "متأجلة — بتتصدر لما الدفع يتأكد، أو إشعار استرداد",
        "dashboard": "بانتظار تأكيد (راجع مع البوابة)",
        "notification": "رسالة مراجعة + كود المرجع"
      }
    }
  }
}