🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials November 4, 2026

How to Take Paymob Payments with Gravity Forms (Egypt, UAE, Saudi Arabia)

GravityExtra
How to Take Paymob Payments with Gravity Forms (Egypt, UAE, Saudi Arabia)

Paymob is one of the leading online payment providers in Egypt, and it also serves merchants in the United Arab Emirates, Saudi Arabia, Oman and Pakistan. Customers there pay with local cards, with mobile wallets on their phone, or at a kiosk near home. If your bookings, orders, registrations or donations already run on Gravity Forms, you can take those payments right in the form, on the secure Paymob checkout page. This guide shows how, step by step, with the Gravity Forms Paymob Premium Add-on.

Which Paymob accounts this guide is about

This add-on works with Paymob accounts in Egypt (EGP), the United Arab Emirates (AED), Saudi Arabia (SAR), Oman (OMR) and Pakistan (PKR). The region comes from your keys (they start with egy_, are_, ksa_, omn_ or pak_), and the form currency must be the currency of that region. The add-on adds these five currencies to Gravity Forms when they are missing.

Why take payments in the form itself

  • The customer fills in one form and pays at once, without a separate online shop.
  • The amount is the form total worked out on your server, so a changed price in the browser is never charged.
  • The Paymob checkout page shows the payment methods of your account: cards, mobile wallets, kiosk payments and more.
  • The entry shows whether the customer paid, the Paymob transaction and the payment method, and you refund from the same screen.
  • Your booking e-mails can wait until the payment is confirmed.

What you need before you start

  • A Paymob merchant account. Test mode works right after sign-up; live payments start when Paymob has activated the account.
  • Gravity Forms 2.9 or newer with the currency set to the currency of your region: Egyptian pound (EGP), UAE dirham (AED), Saudi riyal (SAR), Omani rial (OMR) or Pakistani rupee (PKR).
  • Your site public and on HTTPS, so Paymob can send callbacks.
  • The add-on: one site $49 a year, five sites $69 a year, unlimited sites $199 a year.

Step 1: Collect your keys from the Paymob dashboard

Log in to the Paymob dashboard and open Settings → Account info. There you find the secret key and public key for test mode and live mode, the API key and the HMAC secret. Then open Developers → Payment Integrations: each payment method you can offer (card, mobile wallet, kiosk) has an integration ID, and test and live integrations have different IDs. Write down the test IDs you want to show on the checkout page.

Key What the add-on does with it
Secret key Creates the payment and refunds, on your server only
Public key Opens the checkout page for your customer
Integration IDs Choose the payment methods on the checkout page
API key Retrieves the transaction from Paymob to check it
HMAC secret Checks the signature of every callback

Step 2: Install the add-on and connect

Install and activate the add-on, then open Forms → Settings → Paymob and activate your licence. Leave the mode on Test mode, paste the test keys, the integration IDs, the API key and the HMAC secret, and save. The account line turns green with your region, a masked secret key and the integration IDs. Everything secret is stored encrypted.

Paymob settings: Test or Live mode, the secret key, public key and integration IDs for each mode, the API key and HMAC secret, the EGP currency line for Egypt, the account-ready line and the callback address
Settings: choose Test or Live mode, paste the keys and integration IDs from your Paymob dashboard. Secrets are stored encrypted; the callback address is sent with every payment.

There is no separate webhook to create. The add-on sends its callback address with every payment, and Paymob uses it for that payment. The settings page shows the address and the last callback it accepted, so you can see at a glance that callbacks arrive.

Step 3: Build the form

Add a name, an e-mail, a mobile number and your product fields with a total. Quantities, options and calculations work as usual, because the add-on charges the total Gravity Forms works out on the server when the form is submitted. When the form products add up exactly to the total, they are sent to Paymob as separate items; otherwise the payment carries one item for the total.

A Nile felucca trip booking form with name, e-mail, mobile number, trips and dinners with quantities, the total in Egyptian pounds and the Continue to payment button
The form your customer fills in. Card and wallet details are entered on the Paymob page, not here.

Step 4: Add the Paymob feed

In the form settings, open Paymob and add a feed. Choose Products and Services with the form total and map the name, e-mail, phone, city and country: Paymob asks for billing data with every payment, and the add-on fills anything you leave out with “NA”. Write a payment description such as Trip booking #{entry_id}.

The Paymob feed: products and services with the form total, first name, last name, e-mail, phone, city and country mapped, the payment description and the notification option
The feed: map the billing fields Paymob needs and set the payment description.

Step 5: Make a test payment

  1. Open the form page, fill it in and press the submit button.
  2. You land on the Paymob checkout page in test mode. Pay with one of the test cards from the Paymob documentation.
  3. You come back to your confirmation, and the entry shows Paid with the transaction and the payment method.
  4. Try a declined card too: your form page says nothing was charged, the entry is marked Failed, and a link takes you back to the same checkout page to try again.

How the payment is checked

Paymob signs every callback with your HMAC secret. The add-on recomputes the HMAC-SHA512 over the transaction fields and refuses anything that does not match. Then it retrieves the transaction from Paymob with your API key and compares the reference, the Paymob order, the mode, the amount in minor units, the currency and the result with the entry. Only a successful transaction that matches marks the entry paid, and a repeated callback never pays twice.

What the customer sees

  1. Your form, with the total updating as they choose products or quantities.
  2. The Paymob checkout page with the amount and the payment methods you chose, for example a card or a mobile wallet.
  3. Your own confirmation after paying. If the payment is still being confirmed, the page says so and checks again by itself.
  4. If the card is declined, a message that nothing was charged, with a link to try again.

Kiosk and cash payments

Some customers prefer to pay in cash at a kiosk or payment outlet. When they choose such a method, Paymob reports the transaction as pending and gives them a reference to pay with. The add-on marks the entry Pending with a note, and the customer sees that the payment is waiting. When they pay, Paymob sends another callback and the entry becomes Paid, with your notifications sent at that moment.

Refunds from the entry

Open a paid entry and use the refund form in the Paymob box. Refund part of the payment or all of it, in one go or in several steps, up to the amount paid. Paymob answers with the refund transaction, and the entry becomes Partially Refunded or Refunded straight away. Refunds and voids made in the Paymob dashboard appear on the entry too, after the add-on has retrieved and checked them.

An entry paid through Paymob and partly refunded: the Paymob box with the status, transaction, reference, Paymob order, method, region, amount, refunded amount and the refund form
The entry after payment: status, Paymob transaction and method, and refunds from the entry screen.
Where the refund starts What the add-on does
Entry screen Sends the refund to Paymob, checks the refund transaction and books it at once
Paymob dashboard Receives the signed callback, retrieves the refund and books it once
Void in the dashboard Retrieves the payment, checks that it is voided and marks the entry Voided

What about subscriptions?

Recurring payments with Paymob use a subscription integration that Paymob has to enable on your account. Because that is not something you can switch on yourself, the add-on does not offer a subscription option: each form submission is one payment. For regular fees, many merchants simply send their customers a link to the form each period.

Good uses

Business Form
Tours and activities Trips with group sizes, extras and dates
Clinics and services Deposits and appointment payments
Schools and training centres Course fees, exam fees and materials
Events Tickets, registrations and extras such as meals
Charities and associations Donations and membership dues

Going live

  1. Wait until Paymob has activated your account for live payments.
  2. Copy the live secret key, the live public key and the live integration IDs into the Live fields of the add-on.
  3. Choose Live mode and save.
  4. Make one small real payment and refund it from the entry.

A quick checklist

Check Where
Account line green in the right mode Forms, Settings, Paymob
Form currency is the currency of your Paymob region Forms, Settings, Currency
Site public and on HTTPS, Paymob not blocked by a firewall Your hosting
Last accepted callback shown after a test payment Forms, Settings, Paymob
Test payment, declined card and a refund done Test mode

Wrapping up

With the add-on in place, your Gravity Forms take payments on the Paymob checkout page with the methods customers in Egypt and the region know, every callback is HMAC-checked, every transaction is retrieved from Paymob and checked on your server before an entry changes, and refunds run from the entry screen. Read the full setup guide for every setting, or get the Gravity Forms Paymob Premium Add-on for one site $49 a year, five sites $69 a year, unlimited sites $199 a year.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr