Who should use this guideThis guide is intended for merchants who:
- Use Payrails as a payment orchestrator
- Use Paymob to accept cards, Meeza Wallet or Kiosk payments in Egypt
- Have an active Paymob account with a Card, Mobile Wallet or Kiosk payment integration
Create a Paymob integration in Payrails
- Log in to the Payrails portal.
- Go to Settings → Integrations.
- Select Add instance to create a new integration configuration.
- Select the workspaces where this integration should be available.
About workspacesWorkspaces 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.

Step 3: Configure your Paymob integration
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.

Account details
In Paymob- Go to Settings → Contact Information and copy your Merchant ID.
- Go to Developers → Payment Integrations and copy the Integration ID of each payment integration you use: type Online Card for cards, type MOTO for payments without the customer present, type Mobile Wallet for Meeza Wallet, type Kiosk for Kiosk.

Credentials
In Paymob- Go to Settings → Account Info and copy your API key, secret key, public key and HMAC.
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.

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, captures, refunds and voids, and sends a separate notification with the card token when it saves a card, and Payrails verifies each notification with your HMAC secret.Payment methods
In Payrails- Select Card, Meeza Wallet, Kiosk or any combination.

Request fields for Paymob
Send these fields in the authorize request for card payments, 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.How Paymob handles cards
- Paymob authenticates every customer payment on a card integration with 3D Secure. Payrails returns a redirect to Paymob’s challenge page. When the customer comes back, Payrails reads the result from Paymob.
- The capture mode belongs to the Paymob integration, not to the request. An Auth card integration supports manual capture, and a Sale card integration captures when the customer pays. Set the capture mode of your workflow to match the integration you entered.
- On an Auth integration, you can capture the full amount or part of it, as many times as you need up to the authorized amount.
- You can cancel an authorization within 14 days. A payment on a Sale integration can be canceled on the business day it was made. After that, refund it.
- You can refund a captured payment in full or in part, as many times as you need up to the captured amount.
- Payrails sends your payment ID to Paymob as the order reference for cards, so every retry of a payment is a new order at Paymob.
- Payrails maps declines, expired cards, insufficient funds, failed 3D Secure authentication and issuer or gateway errors to Payrails result codes, and keeps Paymob’s codes in the payment’s provider result details.
Saved cards and recurring payments
- To save cards, ask Paymob to turn on tokenization for your Online Card integration. Paymob then saves each card after a successful 3D Secure payment, and Payrails stores the token on the instrument. There’s no request field that turns saving on or off.
- Send
meta.order.processingTypeasCardOnFileto charge a saved card while the customer is present. The customer completes 3D Secure again on the card integration. - Send
SubscriptionorUnscheduledCardOnFileto charge a card saved at Paymob without the customer. Payrails sends these payments to your MOTO integration, with no 3D Secure. - Send
MOTOfor orders you take by mail or telephone. Payrails sends the payment to your MOTO integration with a saved Paymob token or a new card, with no 3D Secure.
Enable the integration
In Payrails- Select Save account to enable the integration.
- Confirm the integration shows as Enabled.
Next steps
- Run a test card, Meeza Wallet or Kiosk payment with your Paymob test keys. For cards, use the Paymob test cards below with the name
Test Account. - Verify that:
- The payment appears in Paymob.
- The payment status updates correctly in Payrails.
- Once verified in test mode, repeat the setup with your live keys.
Paymob test cards
Use these cards with your Paymob test keys. Use the card holder nameTest Account. Every payment on a card integration goes through 3D Secure. The first card completes without a challenge, and the other two open Paymob’s test challenge page, where you choose Authenticated or Not Authenticated.
On the first card, the expiry date sets the result:
01/39 is approved, 05/39 is declined, 04/27 is an expired card and 08/28 is a timeout.
→ Continue to: Test a payment