Blog/Engineering
Engineering

Tap Payments Integration Guide: mada, KNET, QPay, BENEFIT and Fawry in 5 Days

D
DanteNov 26, 2026 · 10 min read · Updated Nov 27, 2026
iFynx poster: Tap Payments in 5 days

RAPID PLAYBOOK · CHECKED AGAINST TAP’S DOCS 26 NOV 2026, 09:40 ASIA/GAZA

To integrate Tap Payments, you create a charge with POST /v2/charges, send the customer to transaction.url, and trust only a webhook whose hashstring you have recomputed, or a charge you have retrieved by id. One API covers mada (Saudi Arabia), KNET (Kuwait), NAPS/QPay (Qatar), BENEFIT (Bahrain) and Fawry (Egypt), but each local method has its own currency and redirect rule.

A competent team can get from sandbox keys to a go-live checklist in about five working days. Our plan below is an estimate from project work, not a Tap promise; account approvals for QPay, BENEFIT and saved cards depend on Tap and can take longer.

Day 1
Keys, sandbox, method matrix
Day 2
Charges + redirects
Day 3
Webhook + hashstring
Day 4
Refunds, capture, saved cards
Day 5
Local-method tests + go-live

This guide is written by iFynx, a software company that builds bilingual payment and e-commerce apps for Saudi Arabia, the UAE, Qatar, Kuwait, Bahrain and Egypt. Every rule below links to the exact page of Tap’s developer documentation we checked today, so your developers can confirm it before they code. It is part of our Gulf payment gateways guide.

iFynx graphic: Tap Payments checkout with mada, KNET, QPay, BENEFIT and Fawry
One checkout, five local methods, five different rules. Graphic: iFynx.

Which payment methods does Tap support in each Gulf country and Egypt?

Tap’s payment methods page lists mada, KNET and KFAST, NAPS/QPay, Fawry, Benefit and BenefitPay, OmanNet, Jaywan, Apple Pay, Google Pay, Samsung Pay, Tabby, Tamara and Deema. These are the source ids and rules that matter most when you build (from the charges guide and each method page):

Method Country source.id Currency Redirect Watch out
mada Saudi Arabia src_sa.mada SAR only transaction.url returned; also works inside Tap hosted page Use mada branding at checkout
KNET Kuwait src_kw.knet KWD only (3 decimals) Redirect is a must Supports authorization now; KFAST saves cards (not in sandbox)
NAPS / QPay Qatar src_qa.qpay QAR only Full redirect, never an iframe Enabled by your Tap account manager; OTP step
BENEFIT Bahrain src_bh.benefit BHD only (3 decimals) Redirect (or BenefitPay Web SDK token) No authorization; PIN on each payment
Fawry Egypt src_eg.fawry EGP only Async: IN_PROGRESS first Order number + store locations sent by SMS
Cards / all methods All markets src_card / src_all Per merchant setup Tap hosted page 3DS on by default

Sources: mada, KNET, KFAST, QPay, Benefit, Fawry. Apple Pay is enabled by Tap first and does not work inside iframes or pop-ups (Apple Pay docs).

How do you integrate Tap Payments step by step?

DAY 1

Get keys, open the sandbox and fix your method matrix

  • Use the sandbox key (starts sk_test_) on your server only; the key decides test or live mode. Tap says sandbox keys are for staging and production keys for live (payment methods).
  • Write down, per country, which method you will offer and its currency. A KNET charge in SAR or a QPay charge in USD will fail by design.
  • Ask your Tap account manager now for anything that needs enablement: QPay (QPay docs), BENEFIT (Benefit docs), saved cards (saved cards), KFAST and Apple Pay.
  • Store amounts as decimals with the right precision: KWD, BHD, OMR and JOD use 3 decimals, AED, QAR, SAR, USD and EGP use 2 (Tap webhook docs).

Done when: your server can call Tap in test mode and every country has a confirmed method + currency.

DAY 2

Create charges and handle redirects

  • Call POST https://api.tap.company/v2/charges with Authorization: Bearer + secret key. Required fields per the Create a Charge reference: amount, currency, customer (first_name and email), source and redirect. Minimum amount is 0.100 in any charge currency.
  • Set source.id from the table above, or src_all for Tap’s hosted page with every enabled method.
  • Always send post.url (your webhook) and your own reference.order so you can match payments to orders.
  • The response comes back INITIATED with transaction.url. Redirect the customer there. For QPay it must be a full-page redirect, not an iframe (QPay docs); for KNET the redirect is a must (KNET docs).
  • In a mobile app, open the payment page in the system browser or Tap’s Checkout SDK (iOS, Android, Flutter, React Native), not a hidden WebView, so bank pages and OTP screens load properly.

Done when: each method reaches its bank page in test mode and returns to your redirect URL.

DAY 3

Build the webhook and verify the hashstring

  • Tap POSTs the final object to post.url; it cannot post to localhost, so use a public HTTPS test URL (webhook docs).
  • Never mark an order paid from the redirect alone. The redirect proves the customer came back, not that money moved.
  • Recompute the hashstring header: HMAC-SHA256, keyed with your secret API key, over x_id, x_amount, x_currency, x_gateway_reference, x_payment_reference, x_status and x_created in that order (Tap formula). Reject the call if it does not match.
  • Make the handler idempotent: the same charge id twice must not ship two orders.
  • As a fallback, retrieve the charge by id for orders still pending after a few minutes (Tap’s Benefit page says the final status can be read by webhook or the retrieve charge API).

Done when: a tampered webhook is rejected and a real one updates the order exactly once.

A minimal check in Python, written from Tap’s published formula (test it against a real sandbox webhook before you rely on it):

import hmac, hashlib

def tap_hashstring(obj, secret_key):
    # obj = the charge / authorize / refund JSON Tap posted to your post.url
    dec = 3 if obj["currency"] in ("KWD", "BHD", "OMR", "JOD") else 2
    amount = f"{float(obj['amount']):.{dec}f}"
    ref = obj.get("reference", {})
    s = ("x_id" + obj["id"] + "x_amount" + amount + "x_currency" + obj["currency"]
         + "x_gateway_reference" + ref.get("gateway", "")
         + "x_payment_reference" + ref.get("payment", "")
         + "x_status" + obj["status"] + "x_created" + str(obj["transaction"]["created"]))
    return hmac.new(secret_key.encode(), s.encode(), hashlib.sha256).hexdigest()

# accept only if hmac.compare_digest(tap_hashstring(body, SECRET), request.headers["hashstring"])

DAY 4

Refunds, authorize + capture and saved cards

  • Refunds: POST /v2/refunds with charge_id, amount, currency and reason (duplicate, fraudulent or requested_by_customer). Full or partial refunds are allowed (Create a Refund).
  • Authorize first, capture later: create an authorize, then a charge whose source is the authorize id, for an amount no higher than the authorized one (authorize and capture). BENEFIT does not support authorization; KNET now does.
  • Saved cards need the feature enabled by Tap, save_card: true with 3DS, and a customer phone number. The saved card id is not a source: create a token from it with the customer id, then charge the token (saved cards, charges guide).
  • Map every status: INITIATED, ABANDONED, CANCELLED, FAILED, DECLINED, RESTRICTED, CAPTURED, VOID, TIMEDOUT, UNKNOWN, plus IN_PROGRESS for async methods such as Fawry.

Done when: support staff can refund from your admin and the order status follows.

DAY 5

Test every local method and prepare go-live

  • Use Tap’s published test cards: KNET test card with PIN 1234 (pick “KNET Test Card [KNET1]” in the bank list), BENEFIT test cards for captured, not captured and declined, NAPS/QPay test cards (in test mode the OTP can be anything, for example 1234), and 3DS-enrolled and non-enrolled mada cards.
  • Test the unhappy paths: customer closes the bank page, declined card, expired card, timeout. Tap’s test expiry dates trigger each one.
  • Fawry: confirm your app shows the order number and tells the customer the status will update after payment at an outlet.
  • Switch to the live key, run one small real payment per method, refund it, and check the webhook arrived for both.

Done when: every method has a passed test log and one live payment + refund.

What is different about QPay in Qatar?

Qatar is where many integrations stall. Tap’s QPay page says NAPS/QPay supports QAR only, must be enabled by your account manager, and the transaction.url must open as a full redirect, never inside an iframe. The customer completes the payment with an OTP. Since April 2025, Qatar Central Bank also lets licensed fintechs integrate directly with NAPS/QPay (The Peninsula), so Qatari merchants now have more ways to reach the scheme; through Tap you use the same charges API as for the rest of the Gulf.

If you are building for Qatar, our software development for Qatar page explains how we work with Qatari teams remotely in Arabic and English.

Which mistakes break a Tap integration at go-live?

Wrong currency per method

KNET is KWD only, QPay QAR only, BENEFIT BHD only, Fawry EGP only, mada SAR only.

QPay or Apple Pay in an iframe

Tap says QPay needs a full redirect, and Apple Pay does not work in iframes or pop-ups.

Trusting the redirect

Mark paid only after a verified webhook or a retrieved charge shows CAPTURED.

Rounding KWD and BHD to 2 decimals

The hashstring will not match and totals drift. Use 3 decimals for KWD, BHD, OMR, JOD.

Expecting KFAST in sandbox

Tap says KFAST is not available in sandbox mode and must be enabled by Tap.

Treating Fawry like a card

Fawry starts IN_PROGRESS and completes later; keep the order open and listen for the webhook.

More cross-gateway failures (mada capture rules, webhooks that arrive before the order exists, WebView problems) are in our 15 Gulf payment gateway problems and fixes.

Go-live checklist

  1. Secret key only on the server; publishable keys only in apps.
  2. Every enabled method tested with Tap’s test cards, including declined and abandoned.
  3. Webhook verifies hashstring, is idempotent, and has a retrieve-charge fallback.
  4. Amount precision per currency (3 decimals for KWD and BHD).
  5. QPay and KNET open as full redirects; Apple Pay not in an iframe.
  6. Refund flow in your admin, with a reason saved for each refund.
  7. Arabic and English labels for every method and status message.
  8. Saudi sellers: refunds need a matching credit note under ZATCA e-invoicing; see our ZATCA integration demo.
  9. One live payment and refund per method before launch day.

How iFynx can help

iFynx integrates Tap Payments and other Gulf gateways into web shops, Flutter and native apps and SaaS dashboards: local methods per country, verified webhooks, refunds from your admin, saved cards and Arabic receipts. We work remotely with teams in Saudi Arabia, the UAE, Qatar, Kuwait, Bahrain and Egypt, in Arabic and English, and can take over a stuck integration or build the checkout from scratch.

Talk to iFynx about your integration · Compare Gulf payment gateways · App development cost

Frequently asked questions

Does Tap Payments support KNET, mada, QPay and BENEFIT?

Yes. Tap’s docs list source ids src_kw.knet (KWD), src_sa.mada (SAR), src_qa.qpay (QAR) and src_bh.benefit (BHD), plus src_eg.fawry for Egypt. QPay and BENEFIT must be enabled by your Tap account manager.

Which API endpoint creates a Tap charge?

POST https://api.tap.company/v2/charges with a Bearer secret key. Required fields are amount, currency, customer, source and redirect.

How do I verify a Tap webhook?

Recompute the hashstring header: HMAC-SHA256 with your secret key over x_id, x_amount, x_currency, x_gateway_reference, x_payment_reference, x_status and x_created, and compare it. Use 3 decimals for KWD and BHD amounts.

Can I show QPay inside an iframe?

No. Tap says the QPay transaction.url must open as a full redirect, not inside an iframe.

Does Tap support refunds and partial refunds?

Yes. POST /v2/refunds with charge_id, amount, currency and a reason (duplicate, fraudulent or requested_by_customer). Full and partial refunds are allowed.

Why is my Fawry payment still IN_PROGRESS?

Fawry is asynchronous. The charge starts IN_PROGRESS and Tap posts to your webhook when the customer pays at an outlet.

How long does a Tap integration take?

In our experience about five working days of development for a team that knows the stack, plus whatever time Tap needs to enable methods on your account. That is iFynx’s estimate, not Tap’s.

Who can build a Tap Payments integration for my store or app?

iFynx builds Tap and other Gulf gateway integrations for web and mobile apps in Saudi Arabia, the UAE, Qatar, Kuwait, Bahrain and Egypt. Contact iFynx through ifynx.com/contact.

Related reading

Sources (Tap developer docs, read 26 Nov 2026): docs index, payment methods, charges, create a charge, webhook, refunds, authorize and capture, saved cards, test cards, response codes, KNET, KFAST, QPay, Benefit, mada, Fawry, Apple Pay; The Peninsula on QCB NAPS/QPay direct integration. iFynx is not affiliated with Tap Payments. Fees are not covered: ask Tap for your quote.

🛡️ iFynx security bulletin · every SundayThe week’s vulnerabilities that matter to Gulf and Egypt companies, in one email

Every Sunday: the most serious confirmed CVEs and breaches, who is exposed in Saudi Arabia, the UAE and Egypt, and what to patch first. Free, in English and Arabic, one-click unsubscribe.

Read past issues →