Glossary
Online payment link — A hosted checkout page URL, generated by a payment provider (Geidea, Paymob, Fawry, or Stripe), that a patient can open to pay an invoice, diagnostic fee, or deposit without a card terminal.
PaymentOption — A database model (packages/prisma/schema.prisma) representing one configured payment-provider credential set for a clinic (e.g. "our Paymob account"). Holds the provider type, API username/password, currency, and fee settings. A clinic can have several — one per provider, or several for different branches/currencies.
OnlinePayment — A database model representing one generated payment link and its lifecycle: CREATED → PENDING → SUCCESS / FAILED / REFUND. Shown on an invoice's Online Payments tab.
handleNewOnlinePayment — The shared server-side function (packages/server/src/resolvers/mutations/mutationUtils/onlinePaymentsUtils.js) that all four link-generation flows call into. Branches by provider and builds/sends the provider-specific request. The subject of this PR's fix.
Paymob — One of four supported payment providers, used for PAYMOB-configured PaymentOptions. Requires an auth token exchange before requesting a payment link; expects an email field on the customer object in that request.
Fallback email — online_payment@dentolize.com, the placeholder address Dentolize now sends to Paymob when a patient has no email of their own. It's an address Dentolize controls, not a patient-facing or support contact — it exists solely so Paymob's API always receives a well-formed email field.
Geidea, Fawry, Stripe — The other three supported payment providers. Each has its own request-building logic inside handleNewOnlinePayment and was not affected by this PR.
shipping_data — A sub-object in the Paymob request payload carrying the customer's shipping-style contact details (phone, email, name). Only built when an email is present; unrelated to actual physical shipping — Dentolize doesn't ship anything, this is just the shape Paymob's API expects.