# Digital Wallets

> Accept Digital Wallet payments in Egypt via EBANX Direct with one unified integration covering 50+ wallet providers.

# Digital Wallets

**Digital Wallets** is a mobile wallet payment method in Egypt. Transactions are authenticated by OTP or directly in the wallet app—**no card details are shared**. With a single EBANX integration you can reach **50+ wallet providers** in Egypt through **one unified API**.
Check the [list](https://www.cbe.org.eg/en/payment-systems-and-services/payment-services/mobile-wallet) of digital wallets authorized by the Central Bank of Egypt.

This guide walks you through integrating Digital Wallets via API, covering the payment request, displaying payment instructions, and monitoring payment status.

## Requirements

- **API authentication** — All API requests must be authenticated using [JWS (JSON Web Signature)](/docs/get-started/api-authentication/jws-authentication). The legacy `integration_key` is being deprecated — if you still use it, follow the [Migration Guide](/docs/get-started/api-authentication/jws-migration) to transition to JWS. If you don't have credentials yet, complete the [Merchant Signup Form](https://www.ebanx.com/en/contact/).
- **Familiarity with EBANX Direct** — Same overall structure as other methods with a few wallet-specific fields.
- **Webhook endpoint** — To receive status changes from EBANX.

## How it works

1. **Request Payment** — Call `POST /ws/direct` with `payment_type_code: "meeza"`.
2. **Show Instructions** — Display a 3-hour countdown and use `redirect_url` to open wallet instructions.
3. **Customer Pays** — Customer receives a push/SMS and approves in their wallet or bank app.
4. **Confirmation** — EBANX updates status **PE → CO** (or **CA** at expiry) and sends notifications.

## Key information

- **Supported country**: Egypt (`EG`)
- **Supported currency**: `EGP`
- **Expiration**: **3 hours** from creation
- **Statuses**: `PE` (Pending) → `CO` (Confirmed) or `CA` (Canceled/Expired)
- **Unified coverage**: 50+ wallets via one API (full list available from EBANX)

## Instructions

Follow the steps below.

### Select your environment
Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.

- **Cross-border sandbox:** `https://sandbox.ebanxpay.com/ws/direct`
- **Cross-border production:** `https://api.ebanxpay.com/ws/direct`
- **Local sandbox:** `https://sandbox-local-latam.ebanxpay.com/ws/direct`
- **Local production:** `https://api-local-latam.ebanxpay.com/ws/direct`

Check the method's availability for your country and tenant in [Payment Methods by Country](/docs/pay-in/processing/payment-methods/payment-methods-overview#payment-methods-by-country). Questions about tenant and environment? Check our [API Operability](/docs/get-started/api-operability) and [API Endpoints](/docs/get-started/api-endpoints).

### Define your parameters

Call the **ws/direct** endpoint with the following parameters:

#### Basic parameters

| Parameter               | Requirement | Description                 |
| ----------------------- | ----------- | --------------------------- |
| **`integration_key`**   | Required    | Your EBANX integration key. |
| **`payment_type_code`** | Required    | Set to `"meeza"`.           |
| **`country`**           | Required    | Set to `EG` (Egypt).        |

#### Payment parameters

| Parameter                   | Requirement | Description                                  |
| --------------------------- | ----------- | -------------------------------------------- |
| **`merchant_payment_code`** | Required    | Your unique idempotent code for this charge. |
| **`currency_code`**         | Required    | Supported: `EGP`.                            |
| **`amount_total`**          | Required    | Total amount to charge.                      |

#### Customer data

> **Info:**
> The phone number field should be filled with the user’s **mobile number** linked to the **wallet** they will pay with, as the phone number represents the unique identifier for this mobile wallet.

| Parameter          | Requirement | Description                         |
| ------------------ | ----------- | ----------------------------------- |
| **`name`**         | Required    | Customer name.                      |
| **`email`**        | Required    | Customer email.                     |
| **`phone_number`** | Required    | Format `01XXXXXXXXX` (Egypt local). |

> **Note**
> If the phone number is **not** linked to a wallet, EBANX still creates the payment in `PE`. If the customer doesn’t complete it before expiry, it automatically becomes `CA` code.

### Sample request (cURL)

```bash
curl -X POST \
  --location 'https://sandbox.ebanxpay.com/ws/direct' \
  --header 'Content-Type: application/json' \
  --data '{
    "integration_key": "{{integration_key}}",
    "payment": {
        "name": "John Doe",
        "email": "john.doe@example.com",
        "document": "{{tax_id}}",
        "phone_number": "5555555555",
        "country": "eg",
        "payment_type_code": "meeza",
        "merchant_payment_code": "{{unique_merchant_code}}",
        "currency_code": "EGP",
        "amount_total": 99.85
    }
}'
```

### Sample response

**Displaying Payment Instructions**
A successful request returns a response like the example below. At this stage, payment status will be PE, and you should display clear instructions on how to complete the payment. Use the redirect_url to open the instructions on how to complete the payment.

```json
{
  "redirect_url": "{{redirect_url}}",
  "payment": {
    "hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
    "country": "eg",
    "merchant_payment_code": "{{unique_merchant_code}}",
    "status": "PE",
    "status_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "open_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "confirm_date": null,
    "transfer_date": null,
    "amount_br": "99.85",
    "amount_ext": "99.85",
    "amount_iof": "1",
    "currency_rate": "1",
    "currency_ext": "EGP",
    "due_date": "{{YYYY-MM-DD}}",
    "instalments": "1",
    "payment_type_code": "meeza",
    "pre_approved": false,
    "redirect_url": "{{redirect_url}}"
  },
  "status": "SUCCESS"
}
```

### Monitor payment for status changes

**Monitoring Payment Status**
Once a payment is initiated, you’ll need to monitor its progress and handle status updates accordingly.

**Notifications**
EBANX sends a notification each time a payment status changes.
Ensure your system is properly configured to receive and process these notifications.

Learn more about [Payment Notifications](/docs/pay-in/management/status-and-retrieval/payment-notifications)

**Status Updates**
After receiving a notification, you can retrieve the latest payment status through the API.
When a payment is successfully completed, the status changes from Pending (PE) to Confirmed (CO).
If the customer does not complete the payment within the allowed time, the status will automatically change to Canceled (CA).

Learn more about [Retrieving Payment Status](/docs/pay-in/management/status-and-retrieval/retrieve-payment)

```mermaid
sequenceDiagram
    participant Merchant Backend
    participant EBANX

    Merchant Backend->>EBANX: Initiate Payment
    Note over Merchant Backend,EBANX: Payment created with status Pending (PE)

    loop Monitor Payment Status
        EBANX-->>Merchant Backend: Send notification of status change
        Merchant Backend->>EBANX: Retrieve latest payment status via API
    end

    alt Payment completed
        EBANX-->>Merchant Backend: Status changes from Pending (PE) to Confirmed (CO)
    else Payment expired
        EBANX-->>Merchant Backend: Status changes from Pending (PE) to Canceled (CA)
    end
```

### Congratulations!

You have successfully integrated the Digital Wallets in Egypt.
For more information, refer to the [Direct API reference guide](/api-reference?api=pay-in&page=direct)

## Digital Wallet UX flow

This demo illustrates the end-to-end payment experience with Digital Wallet. The journey begins on the merchant's checkout page, where the customer selects Digital Wallet and enters their mobile number. After submitting the request, a push notification is sent to their Digital Wallet app. The user reviews and approves the payment directly within the app or via an OTP, and once confirmed, both the customer and the merchant receive immediate payment confirmation

![Digital Wallet UX Flowchart](/img/docs/pay-in/processing/payment-methods/country-specific/egypt/paymob-ux-flow.png)

## Resources

Use the following resources when testing in your sandbox environment.
- [API Reference](/api-reference)
- [Mock Customer Data](/docs/pay-in/dev-tools/sandbox-simulation/test-customer-data)
- [Error Codes](/docs/pay-in/dev-tools/response-codes/api-error-codes)
