OpenCart Overview
Integrate DigetPay into your OpenCart store using Hosted Checkout. Customers pay on DigetPay's secure page, and the extension confirms each payment with the DigetPay Transaction Status API before it updates the order.
SSL required. Your store must use a public HTTPS domain with a valid certificate. HTTP,
localhostand private IP addresses are not supported.
Why use the OpenCart extension
| Benefit | Details |
|---|---|
| Secure payments | Hosted checkout — minimal PCI scope |
| Verified orders | Orders are marked paid only after the Transaction Status API confirms the payment |
| Admin setup | Install and configure from the OpenCart admin panel |
| Test & Live modes | Separate Test API Key and Live API Key fields. Test is the default environment |
Supported features
- Hosted checkout integration (Mada, Visa, Mastercard, American Express and Apple Pay on the DigetPay page)
- Sale transactions
- Full and partial refunds from OpenCart admin, confirmed with DigetPay before the order status changes
- Webhook notifications, confirmed with the Status API
- Test Mode and Live Mode on one API, with separate Test and Live API keys
- Each order remembers the mode it was paid in, so status checks and refunds use the matching key
- Order status mapping: paid, failed, fully refunded and partially refunded
- Clear result pages for failed payments and payments still being verified
- English and Arabic language files
- Debug logging (API keys are never logged)
SAR only. DigetPay is shown at checkout only when the customer's checkout currency is SAR.
Version requirements
| Requirement | OpenCart 3.x | OpenCart 4.x |
|---|---|---|
| OpenCart | 3.x | 4.x |
| Extension version | 1.1.0 | 1.5.0 |
| PHP | 7.2+ with cURL | 8.0+ with cURL |
| Store currency | SAR | SAR |
| Store | Public HTTPS with valid SSL | Public HTTPS with valid SSL |
| Checkout | Customer telephone required | Customer telephone required |
| DigetPay | Test API Key and Live API Key from the Merchant Dashboard | Test API Key and Live API Key from the Merchant Dashboard |
Choose the package and guide for your OpenCart version. The 3.x and 4.x extensions are separate downloads. The payment flow is the same, but PHP requirements, admin paths and the refund screen differ between versions.
Differences between versions
| Item | OpenCart 3.x | OpenCart 4.x |
|---|---|---|
| Where refunds are made | DigetPay Refund Manager (in the extension settings, by order ID) | The order page in OpenCart admin |
| Refunds on/off | Enable Admin Refunds setting, disabled by default | Always available to admins with permission |
| Default paid status | Complete | Processing |
| Refund order statuses | Select them in settings (create Partially Refunded if needed) | Created automatically when you save settings |
How it works
flowchart LR A[Customer checkout] --> B[Extension creates session] B --> C[DigetPay hosted page] C --> D[Customer pays] D --> E[Customer returns / webhook arrives] E --> F[Extension checks Status API] F --> G[Order status updated]
- The customer clicks Pay with DigetPay. The extension creates a checkout session with
POST /payment/checkout/intiate, using the key for the selected environment. - The order is created with your default pending status.
- The customer pays on the DigetPay page and returns to the store.
- The extension checks
GET /payment/checkout/status. It updates the order only when the order ID, amount and currency (SAR) match. - DigetPay also sends a webhook. The extension runs the same Status API check, so the order is updated even if the customer does not return.
The extension uses the DigetPay API base URL https://api.digetpay.com/v1 in both Test Mode and Live Mode. Your API key decides the mode.
One webhook URL. The extension shows one webhook URL. Register the same URL in both the Test and Live webhook configurations in the Merchant Dashboard. The extension reads the mode from the saved order, so no environment parameter is needed.
Setup guides
Download, upload, install, and enable the payment module for OpenCart 3.x or 4.x.
Configure Test and Live API keys, the environment, order statuses, and the webhook.
Test payments, process refunds, and troubleshoot common integration issues.
Related docs
Updated about 2 months ago

