> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# Paymob

> Connect Paymob to Payrails to accept Meeza Wallet and Kiosk payments in Egypt, covering account details, API keys and the HMAC secret.

<picture noZoom>
  ![Paymob logo](https://assets.payrails.io/img/logos/paymob/logo.svg)
</picture>

> [!NOTE]
>
> **Who should use this guide**
>
> This guide is intended for merchants who:
>
> * Use **Payrails** as a payment orchestrator
> * Use **Paymob** to accept [Meeza Wallet](https://docs.payrails.com/docs/integrations/payment-methods/meeza-wallet) or [Kiosk](https://docs.payrails.com/docs/integrations/payment-methods/kiosk) payments in Egypt
> * Have an active Paymob account with a Mobile Wallet or Kiosk payment integration

***

## Create a Paymob integration in Payrails

1. Log in to the **Payrails** portal.
2. Go to **Settings** → **Integrations**.
3. Select **Add instance** to create a new integration configuration.
4. Select the **workspaces** where this integration should be available.

> [!NOTE]
>
> **About workspaces**
>
> Workspaces determine where this integration is available. They let you isolate provider setups by region or business line, or share the same configuration across multiple workspaces.

***

## Step 1: Choose the integration type

* Select **Payment**.
* Continue to the next step.

***

## Step 2: Choose the provider

* Select **Paymob**.
* Continue to the next step.

![A screenshot showing Paymob selected as the provider.](https://mintcdn.com/payrails-42074109/5bgwNQYa4BxIPDBd/images/docs/paymob-image-01.png?fit=max\&auto=format\&n=5bgwNQYa4BxIPDBd\&q=85\&s=7fd1d3f1d085eee809823868b79f7e94)

***

## Step 3: Configure your Paymob integration

> [!TIP]
>
> **What you'll need from Paymob**
>
> Before you begin, make sure you can log in to the Paymob dashboard. You'll copy your merchant ID, the integration IDs of your Mobile Wallet and Kiosk payment integrations, and your API keys from it.

***

### Integration instance name

> An integration instance is a specific payment provider setup in Payrails. You can create multiple instances for different regions, currencies, or business needs. Choose a clear, consistent name, as it is used in routing.

**In Payrails**

* Enter an **Instance name** for your integration, for example `merchant_paymob`.

![A screenshot showing the integration instance name field.](https://mintcdn.com/payrails-42074109/145W1v58K5wnDMNC/images/docs/orchestration/integrations/shared/integration-instance-name.png?fit=max\&auto=format\&n=145W1v58K5wnDMNC\&q=85\&s=470be58979509680650b0cbf8b5eecc4)

***

### Account details

**In Paymob**

1. Go to **Settings** → **Contact Information** and copy your **Merchant ID**.
2. Go to **Developers** → **Payment Integrations** and copy the **Integration ID** of each payment integration you use: type **Mobile Wallet** for Meeza Wallet, type **Kiosk** for Kiosk.

**In Payrails**

| Field | Value |
| :- | :- |
| **Merchant ID** | Your Paymob merchant ID |
| **Wallet Integration ID** | The integration ID of your Mobile Wallet payment integration. Needed for Meeza Wallet. |
| **Kiosk Integration ID** | The integration ID of your Kiosk payment integration. Needed for Kiosk. |
| **Card Integration ID** | Not needed. Leave it empty. |

![A screenshot showing the Paymob account details fields.](https://mintcdn.com/payrails-42074109/5bgwNQYa4BxIPDBd/images/docs/paymob-image-02.png?fit=max\&auto=format\&n=5bgwNQYa4BxIPDBd\&q=85\&s=362096ef092bec0389a2d5e98cfcfe19)

***

### Credentials

**In Paymob**

* Go to **Settings** → **Account Info** and copy your API key, secret key, public key and HMAC.

**In Payrails**

| Field | Value |
| :- | :- |
| **API key** | Your Paymob API key |
| **Secret key** | Your Paymob secret key |
| **Public Key** | Your Paymob public key. Payrails uses it to open the Paymob checkout for your customer. |
| **HMAC** | Your Paymob HMAC secret. Payrails uses it to verify Paymob's notifications. |

Use the keys from the Paymob account that matches the mode of your Payrails integration: test keys for test mode, live keys for live mode.

![A screenshot showing the Paymob credential fields.](https://mintcdn.com/payrails-42074109/5bgwNQYa4BxIPDBd/images/docs/paymob-image-03.png?fit=max\&auto=format\&n=5bgwNQYa4BxIPDBd\&q=85\&s=475c8469acea8fee52492916573f2cd9)

***

### Webhooks or notifications

Payrails sends its notification URL to Paymob with every payment, so you don't need to set one up in the Paymob dashboard. Paymob notifies Payrails of payments, refunds and voids, and Payrails verifies each notification with your HMAC secret.

***

### Payment methods

**In Payrails**

* Select **Meeza Wallet**, **Kiosk** or both.

![A screenshot showing the Paymob payment method selection.](https://mintcdn.com/payrails-42074109/5bgwNQYa4BxIPDBd/images/docs/paymob-image-04.png?fit=max\&auto=format\&n=5bgwNQYa4BxIPDBd\&q=85\&s=2beb45361b08dc12182e133cd4c8cba7)

***

## Request fields for Paymob

Send these fields in the [authorize request](https://docs.payrails.com/reference/authorizeaction.md), in addition to the standard authorize fields. **Required** fields must be present for the payment to succeed. Payrails sends **Optional** fields to Paymob when you include them. For more about meta fields, refer to [Meta fields](https://docs.payrails.com/docs/orchestration/meta-fields.md).

| Field | Status | Description |
| :- | :- | :- |
| `amount` | Required | Sent to Paymob in minor units. Use the currency of your Paymob payment integration, usually EGP. The minimum is 10 minor units. |
| `meta.customer.name`, `meta.customer.lastName` | Required | Sent as the billing first and last name. |
| `meta.customer.email` | Required | Sent as the billing email. |
| `meta.customer.phone.number` | Optional | Sent as the billing phone number. |
| `meta.customer.country.code` | Optional | Sent as the billing country. |
| `meta.order.billingAddress` | Optional | Sent as the billing `street`, `doorNumber` (apartment), `city` and `state`. |
| `meta.order.lines` | Optional | Sent as the items, with `name`, `description`, `quantity` and `unitPrice`. The line prices times quantities must add up to `amount`. |
| `merchantReference` | Optional | Sent as the special reference. Use a new value for every payment: Paymob rejects a reference it has seen before. |

***

## Enable the integration

**In Payrails**

* Select **Save account** to enable the integration.
* Confirm the integration shows as **Enabled**.

Your **Paymob** integration is now ready to process payments.

***

## Next steps

1. Run a test Meeza Wallet or Kiosk payment with your Paymob test keys.
2. Verify that:
   * The payment appears in Paymob.
   * The payment status updates correctly in Payrails.
3. Once verified in test mode, repeat the setup with your live keys.

→ Continue to: [Test a payment](https://docs.payrails.com/docs/orchestration/payment-acceptance/test-payments.md)


## Related topics

- [Kiosk via Paymob](https://docs.payrails.com/docs/integrations/payment-methods/kiosk/paymob.md)
- [Meeza Wallet via Paymob](https://docs.payrails.com/docs/integrations/payment-methods/meeza-wallet/paymob.md)
- [Kiosk](https://docs.payrails.com/docs/integrations/payment-methods/kiosk.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.