Skip to contentTalk to us
Payments & commerceSaudi Arabia

How to accept mada and Apple Pay on your website or app

A practical guide to accepting mada and Apple Pay on your website or app in Saudi Arabia: gateway setup, domain verification, 3D Secure, testing and pitfalls.

Fanann Team8 min read
WhatsApp
madaPaytabbytamara
Quick answer

To accept mada and Apple Pay on your website or app, open a merchant account with a licensed payment gateway that supports both, connect it through its API or a hosted payment form, and enable Apple Pay by verifying your domain through the gateway (and, for iOS apps, with an Apple merchant ID). Then test successful, declined and refunded payments in the sandbox before going live.

People look for this as
  • how to accept mada payments online
  • how to add apple pay to my website
  • mada payment gateway integration
  • apple pay not showing on website
  • accept mada in mobile app saudi

How do you accept mada and Apple Pay on your website or app?

To accept mada and Apple Pay on your website or app you need three things: a merchant account with a licensed gateway that supports both, a technical connection between your store and that gateway, and Apple Pay setup (domain verification for the web, a merchant ID for iOS apps). The gateway deals with the mada network, operated by Saudi Payments, and with Apple and the banks; you receive the result: approved or declined.

Why these two? mada is the everyday card for most customers in Saudi Arabia, and Apple Pay lets iPhone users pay with a touch or a glance without typing a card number, and it works with mada cards too. A checkout that shows both clearly at the top means fewer steps and fewer abandoned carts, especially for shoppers arriving from Snapchat and TikTok ads.

Have not picked a gateway yet? Start with how to choose the best payment gateway in Saudi Arabia, then come back here to implement it.

What do you need before you start?

RequirementDetailsFor
Active merchant accountWith a gateway that supports mada and Apple Pay, using commercial registration or a freelance document depending on the providerWebsite and app
Bank account and IBANTo receive settlementsWebsite and app
Custom domain and SSLYour site runs on HTTPS on your own domain, not a temporary linkWebsite
Policy pagesRefunds, privacy, terms, contact details and seller identityWebsite and app
Apple developer accountTo create a merchant ID and enable the Apple Pay capabilityiOS app
API keysTest and live keys, stored in server settings, never in codeWebsite and app

How do mada payments work on your site?

When a customer enters a mada card, the gateway recognizes the card type and routes the payment through the mada network. The customer is usually asked for extra verification through 3D Secure: a code from their bank or an approval in the banking app. This protects the customer, protects you from fraud, and shifts much of the liability for suspicious payments away from you.

Embedded form or the gateway's page?

Payment form embedded in your page
  • The customer stays on your site, which feels more professional
  • Card fields are hosted by the gateway inside your page, so card data never touches your server
  • Needs more careful styling and right-to-left layout
  • Suits stores and apps that care about their brand
Redirect to the gateway's page
  • Faster to set up and less to maintain
  • The gateway handles display and security entirely
  • Changing page can confuse some customers
  • Suits fast launches and first versions

Either way, never store card numbers in your database. To save a card for later, for example for subscriptions, use the gateway's tokenization. More in payment security basics and 3D Secure.

How do you add Apple Pay to your website and app?

Apple Pay on your website

  1. Enable Apple Pay in your gateway dashboard; most gateways offer a way to verify your domain with Apple on your behalf.
  2. Download the verification file the gateway provides, place it at the required path on your domain, then complete verification in the dashboard.
  3. Make sure the site runs on HTTPS with a valid certificate, and that the Apple Pay button only shows on supported devices and browsers.
  4. Use Apple's official button style, at the top of checkout and before the card form.

Apple Pay inside an iOS app

  1. Create a merchant ID in your Apple developer account.
  2. Create a payment processing certificate together with your gateway, which decrypts the payment data.
  3. Enable the Apple Pay capability in the app settings and link it to the merchant ID.
  4. Test on a real device with a test card, then submit the app for review.

Integration steps from start to first real payment

  1. 1
    Open a test account

    Register with the gateway and get test keys plus test cards for mada and Visa.

  2. 2
    Create the order on the server

    Calculate the final amount server-side (with 15% VAT, shipping and discounts) and never trust an amount sent from the browser.

  3. 3
    Show the checkout

    Apple Pay and mada at the top, then other cards, then Tabby and Tamara if enabled.

  4. 4
    Receive the result by webhook

    Set the order to paid only when the gateway's confirmation reaches your server, and verify the notification signature.

  5. 5
    Issue the invoice and confirmation

    A QR-coded tax e-invoice and a confirmation message on WhatsApp or SMS.

  6. 6
    Go live

    Switch keys, verify your real domain for Apple Pay, run a small real payment, then refund it.

Pre-launch payment test checklist

Most payment problems only appear with real customers. This list catches them first:

  • A successful mada payment with the 3D Secure step, on an Android phone.
  • A successful Apple Pay payment on an iPhone in Safari, and inside the iOS app if you have one.
  • A declined card and insufficient funds: is there a clear Arabic message with a retry button?
  • Closing the page mid-payment: does the order stay "awaiting payment" and update automatically when the webhook arrives?
  • Tapping the pay button twice: is only one order created?
  • Full and partial refunds from the admin panel, reflected in the sales report.
  • Amounts shown correctly in SAR, and the invoice with the right VAT.

Build it with Fanann: a copy-ready prompt

If you build your app with AI, ask for payments clearly from the start, because the agent shapes orders and the database around how people pay. The payments page lists the methods Fanann supports.

Paste this into Fanann

Add a Saudi checkout to my store, Arabic and right-to-left. Show the Apple Pay button at the top only on supported devices, then mada, then Visa, Mastercard and STC Pay. Connect payments to a payment gateway through its API with test and live modes, and keep the keys in server settings. Calculate the final amount on the server with 15% VAT and shipping. Use a gateway-hosted card form with 3D Secure and never store card numbers. Set an order to paid only after a signed webhook from the gateway, and prevent duplicate orders on double taps. Show clear Arabic error messages with a retry button. Issue a QR-coded tax invoice and send the order confirmation on WhatsApp. In the admin panel add full and partial refunds and a sales report by payment method. Prepare the iOS app with the Apple Pay capability.

Try it in Fanann

For a deeper look at Apple Pay on the web, read Apple Pay on your website, and for every local method see our local payments guide.

Key takeaways

  • mada and Apple Pay both run through your payment gateway; you never deal with banks or card networks directly.
  • Apple Pay works with mada cards, so enabling it serves a large share of iPhone customers.
  • Apple Pay on the web needs a verified domain and HTTPS; in an iOS app it needs an Apple merchant ID.
  • Only mark an order as paid after the gateway confirms it server-side through a webhook.
  • Test on real devices, an iPhone with Safari and an Android phone with a mada card, before any campaign.

Frequently asked questions

How do I add mada payments to my website?
Open a merchant account with a gateway that supports mada, connect it through its API, a plugin or a hosted payment form, test in the sandbox, then switch to live keys once your account is approved.
Does Apple Pay work with mada cards?
Yes. mada cardholders can add their cards to Apple Wallet and pay with Apple Pay, so enabling it serves a large share of iPhone customers in Saudi Arabia.
Why is the Apple Pay button not showing on my website?
The usual causes: the domain is not verified with Apple through your gateway, the site is not on HTTPS, the browser or device does not support Apple Pay, or Apple Pay is not enabled on your merchant account.
Do I need a commercial registration to accept mada and Apple Pay?
It depends on the provider. Many gateways require commercial registration, and some accept a freelance document for eligible activities. Ask the provider directly about onboarding documents.
Can I use Apple Pay to sell a subscription inside an iOS app?
It depends on what you sell. Services and physical goods are usually paid with Apple Pay or a gateway, while digital content consumed in the app may require Apple's in-app purchase. Check the current App Store guidelines.

Ask your AI assistant about this

Copy this prompt into the AI assistant you use, then add the details of your own case.

I am reading this guide: “How to accept mada and Apple Pay on your website or app” https://fanann.com/en/blog/accept-mada-apple-pay-website/ My question: how to accept mada payments online Use that page as a source and explain the answer step by step for my situation, tell me what to check before I start, and cite the page link.

Terms in this article

Your idea deserves to see the light.

Describe it in Arabic or English and Fanann builds, tests and ships it — no coding knowledge needed. Start free, no credit card.