Skip to contentTalk to us
Payments & commerce

How to add payments to your app: gateways, checkout and receipts

A practical guide to adding payments to your app in the Gulf: gateway choice, checkout, mada and Apple Pay, webhooks, receipts, invoices and refunds.

Fanann Team9 min read
WhatsApp
madaPaytabbytamara
Quick answer

To add payments to your app: open a merchant account with a gateway that supports local methods such as mada, Apple Pay, Tabby and Tamara; use the gateway's hosted payment page or secure fields instead of collecting card data yourself; confirm success on your server through a webhook before confirming the order; and issue a receipt or invoice with the right VAT. In Fanann you describe what you want, all of this is built, and you connect your own gateway account.

People look for this as
  • how to add payments to an app
  • how to integrate a payment gateway in my app
  • accept mada payments in my app
  • add apple pay to website
  • payment webhook how it works
  • integrate tabby and tamara

How do you add payments to your app? The full picture

To add payments to your app, you go through five steps: choose a payment gateway and open a merchant account; build a checkout that shows the right methods for your customer; confirm the payment on your server; issue a receipt or invoice; and prepare for refunds and disputes. Each step has details, but the idea is simple: the gateway handles cards and money, your app handles the order and the customer.

In the Gulf, payments are not just Visa and Mastercard. Saudi customers expect mada and Apple Pay, and many split payments with Tabby or Tamara. Kuwaiti customers expect KNET, Bahrainis Benefit, and in the UAE Visa, Mastercard and Apple Pay, with the local Jaywan card now arriving. For each method in detail, read the local payments guide.

This guide explains each step in plain language, with the common mistakes that cost app owners money and customer trust, plus a copy-ready prompt for Fanann.

Step 1: choose a gateway and set up your merchant account

A payment gateway is the company that takes card details securely, talks to the bank and settles money to you. When choosing, weigh these points:

CriterionWhy it mattersQuestion to ask the gateway
Local methodsCustomers leave if their method is missingDo you support mada, Apple Pay, STC Pay, Tabby, Tamara or KNET?
Onboarding requirementsSome gateways require a commercial registerWhich documents do you need for my activity?
Settlement timeAffects cash flowWhen does money reach my bank account?
FeesVary by method and volumeWhat are the fees per method, and are there fixed fees?
Docs and supportDetermines how easy integration isIs there a sandbox, clear documentation and local support?
Refunds and disputesProtect your customer relationshipHow do full and partial refunds work?

In Saudi Arabia, gateways such as Moyasar, Tap, HyperPay and PayTabs are widely used; in the UAE, Network International, Telr and Checkout.com. For help choosing, see best payment gateway in Saudi Arabia and best payment gateway in the UAE.

Step 2: checkout, hosted or embedded?

There are two common ways to show payment in your app, and both keep card data away from your server:

Hosted payment page
  • The customer goes to the gateway's page and returns
  • Fastest to integrate with the lightest security burden
  • Less control over look and experience
  • Good for a start and a first version
Embedded payment fields
  • Payment happens on your page in secure gateway fields
  • Smoother experience and more design control
  • Needs more careful integration and testing
  • Worth it as order volume grows

Either way, design checkout for Gulf customers:

  • Show Apple Pay first on iPhones, and mada clearly for Saudi cards.
  • Show Tabby or Tamara installments next to the price, not buried at the bottom.
  • Show the total including VAT and delivery before the pay button.
  • Make the page Arabic right-to-left, with clear numbers and the right currency.
  • Keep fields to a minimum and save the address for next time.

Step 3: confirm payment on the server with a webhook

This is the step many people skip, and it causes most 'paid' orders that were never paid. When a customer lands on a 'payment successful' screen, that is not enough to confirm the order: they may close the app before returning, or the screen could be tampered with. The right way is for the gateway to send a direct notification to your server, called a webhook, which your server verifies before confirming the order.

  1. 1
    Create the order as 'awaiting payment'

    Before sending the customer to pay, save the order and amount in the database.

  2. 2
    Send the customer to pay

    Through the gateway page or embedded fields, with the order number as a reference.

  3. 3
    Receive the webhook

    The gateway tells your server the result: success, failure or cancellation.

  4. 4
    Verify the notification

    Confirm it really came from the gateway and that amount and currency match the order.

  5. 5
    Update the order

    Mark it 'paid', then send the confirmation and receipt to the customer.

  6. 6
    Handle duplicates

    The same notification can arrive more than once; never confirm or invoice twice.

Step 4: receipts, invoices and VAT

After a successful payment, customers expect an instant receipt by email, WhatsApp or in the app. In many cases you must also issue a correct tax invoice.

ItemSaudi ArabiaUAE
VAT15% (ZATCA)5% (FTA)
E-invoicingE-invoices with a QR code, with Fatoora integration rolling out in wavesPhased rollout from 2027 through an Accredited Service Provider; B2C out of scope for now
What your app needsVAT calculation and QR-coded invoices with sequential numbersVAT calculation and tax invoices with the required details

Fanann issues QR-coded e-invoices with VAT calculated, but you still need to make sure your business settings are right and match your obligations.

Step 5: refunds, cancellations and disputes

An app that handles refunds well earns customer trust. Prepare these before launch:

  • A refund button in the admin panel that calls the gateway directly, full or partial.
  • Refund permission for specific roles only, with a log of who did what and when.
  • Automatic order and stock updates after a refund.
  • For installment payments, confirm the refund flow with Tabby or Tamara.
  • A clear refund policy in the app that matches what you actually do.

For the full details, read refunds and chargebacks in the Gulf.

How Fanann builds payments into your app

In Fanann you do not write integration code yourself. You describe how you want to get paid, and the agent builds the checkout, order states, webhook handling, receipts, invoices and the refund button in the admin panel. Then you connect your own merchant account, so money goes straight to you.

Copy-ready prompt to add payments to your app

Add payments to the restaurant ordering app we built. I want an Arabic right-to-left checkout that shows Apple Pay first on iPhone, then mada and Visa/Mastercard cards, then Tabby and Tamara installments for orders above a limit I set, and cash on delivery as the last option. Save the order as 'awaiting payment' before redirecting to the gateway, and only confirm it after a verified webhook that matches the amount. Do not store any card data. After success, send a receipt on WhatsApp and issue a QR-coded e-invoice with 15% VAT. In the admin panel, add a full or partial refund button for managers only, with an activity log. Turn on test mode first.

Try it in Fanann

Checklist before your first real payment

  1. Test every payment method in test mode, including declined payments.
  2. Confirm orders only become paid after the webhook arrives.
  3. Make a small real payment, then refund it in full.
  4. Check the receipt and invoice: name, VAT, number, QR code.
  5. Confirm the money reaches your bank account in the expected time.

Key takeaways

  • Never store card data in your app; use the gateway's hosted page or secure fields.
  • Do not confirm an order from the success screen alone; confirm it when the gateway's webhook reaches your server.
  • In the Gulf, order payment methods for your customer: mada and Apple Pay in Saudi Arabia, KNET in Kuwait, Benefit in Bahrain.
  • Receipts and invoices are part of payments: 15% VAT in Saudi Arabia and 5% in the UAE, plus e-invoicing rules.
  • Test every method in test mode, then with a small real amount, and try a refund before launch.

Frequently asked questions

How do I integrate a payment gateway into my app?
Open a merchant account with a gateway that supports local methods, use its hosted page or secure fields, confirm orders on your server via webhook, then issue the receipt and invoice. In Fanann this is built from your description and you connect your account.
Can I accept online payments without a commercial register?
It depends on the gateway and your activity. Some gateways accept the Saudi freelance document for eligible activities. Ask the gateway about its requirements for your activity before you start.
How do I add Apple Pay to my app or website?
Through a gateway that supports Apple Pay, with domain verification as Apple and the gateway require. In Saudi Arabia Apple Pay runs on mada cards, so show it first to iPhone users.
How do I integrate Tabby and Tamara?
You need a merchant account with each, or a gateway that supports them; then show installments at checkout and confirm the order after approval. Pay attention to how refunds work for installment orders.
Should I store card details in my app?
No. Leave card data to the gateway and use its hosted page or secure fields. Storing card data exposes you to strict security requirements and serious risk.

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 add payments to your app: gateways, checkout and receipts” https://fanann.com/en/blog/add-payments-to-your-app/ My question: how to add payments to an app 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.