Payment WiFi Integration

Initialize

1- Start Easypay Service:

  • Click the Connect button in the Easypay app.

  • Click Start to initiate the service.

  • Save the displayed IP Address for later use.

  • Click Running in Background to keep the service active.

2- Create WebSocket Connection:

Easypay service operates on two ports:

  • 5000: Insecure connection (HTTP)

  • 9000: Secure connection (HTTPS)

Insecure Connection Example:

Secure Connection Example:

Purchase

Important: The amount should be entered without decimals. For example, 100 represents 1.00 SAR, and 1455 represents 14.55 SAR. The maximum length is 12 digits, including the exponent (e.g., 123456789012 equals 1,234,567,890.12 SAR).

Reference ID: You may pass a Reference ID in the customerReferenceNumber field to attach it to the transaction. Otherwise, set it to null.

Processing a Purchase Request Using WiFi Integration

To initiate a payment using the WiFi Integration method, establish a WebSocket connection and communicate with the Easypay service in real-time.

Example Code:

Find Payment Sample Response model here

Refund

To process a refund, provide the transactionUuid of the original transaction you wish to refund.

Processing a Refund Using WiFi Integration

To initiate a refund using the WiFi Integration method, establish a WebSocket connection and communicate with the Easypay service in real-time.

Example Code:

Find Payment Sample Response model here

Reconciliation

Processing a Reconcile Using WiFi Integration

To initiate a Reconcile using the WiFi Integration method, establish a WebSocket connection and communicate with the Easypay service in real-time.

Example Code:

Receipt Management

Printing the Last Transaction Receipt

Summary of Core Functionalities WiFi Integration

Functionality
WiFi Integration

Making a Payment

- Sends { method: "PURCHASE", amount, customerReferenceNumber } via WebSocket - Handles real-time responses

Processing a Refund

- Sends { method: "REFUND", transactionUuid, amount, customerReferenceNumber } via WebSocket - Handles real-time responses

Printing Last Receipt

- Sends { method: "PrintLastResult" } via WebSocket - Handles real-time responses

Opening the Cash Drawer

- Sends { method: "OpenDrawer" } via WebSocket - Handles real-time responses

Last updated