WooCommerce Overview
Connect WordPress WooCommerce to DigetPay Hosted Checkout — install, configure, and accept Mada, Visa, and Apple Pay.
Connect WooCommerce to DigetPay Hosted Checkout. Customers pay on DigetPay's secure hosted page, and the plugin confirms each payment with the DigetPay Transaction Status API before it updates the order.
SSL required. Your store must use a public HTTPS domain.
http://,localhost,.localand private IP addresses are not supported.
Why use the WooCommerce plugin
| Benefit | Details |
|---|---|
| Secure payments | Hosted checkout — card data never touches your server |
| Verified orders | Orders are marked paid only after the Transaction Status API confirms the payment |
| Simple setup | Install and configure the plugin from WordPress — no custom backend code required |
| Test & Live modes | Separate Test API key and Live API key fields. Test Mode is on by default |
Supported features
- Hosted Checkout with redirect
- Mada, Visa, Mastercard, American Express, and Apple Pay (on the DigetPay hosted page)
- Sale transactions, and full or partial refunds from the WooCommerce order screen
- Order updates from the customer's return and from webhooks, both confirmed with the Status API
- Test Mode and Live Mode on one API, with separate Test and Live webhook URLs
- Each order remembers the mode it was paid in, so status checks and refunds always use the matching key
- Classic checkout and WooCommerce Checkout Blocks
- WooCommerce High-Performance Order Storage (HPOS)
- Optional debug log in WooCommerce → Status → Logs (API keys are never logged)
Requirements
| Requirement | Version / Details |
|---|---|
| WordPress | 6.0+ (tested up to 6.7) |
| WooCommerce | 7.0+ (tested up to 9.4) |
| PHP | 7.4+ with the cURL extension |
| Store currency | SAR only |
| Store | Public HTTPS domain with a valid certificate |
| DigetPay | Test API Key and Live API Key from the Merchant Dashboard |
SAR only. If the store currency is not SAR, DigetPay is hidden at checkout and WordPress shows an admin notice.
How it works
flowchart LR A[Customer checkout] --> B[Plugin creates session] B --> C[DigetPay Hosted Checkout] C --> D[Customer pays] D --> E[Customer returns / webhook arrives] E --> F[Plugin checks Status API] F --> G[WooCommerce updates order]
| Step | Who | What happens |
|---|---|---|
| 1 | Store | Customer selects DigetPay at checkout |
| 2 | Plugin | Creates a checkout session with POST /payment/checkout/intiate, using the key for the current mode |
| 3 | Customer | Is redirected to DigetPay Hosted Checkout and completes payment |
| 4 | Customer | Returns to the store |
| 5 | DigetPay | Sends a webhook notification to the store's webhook URL for that mode |
| 6 | Plugin | On return and on webhook, checks GET /payment/checkout/status and updates the order from that result |
The plugin uses the DigetPay API base URL https://api.digetpay.com/v1 in both Test Mode and Live Mode. Your API key decides the mode.
Webhook = notification. The plugin never updates an order from the webhook payload. It always confirms the result with the Transaction Status API, and marks the order paid only when the payment is confirmed and a gateway transaction ID is returned.
Register a webhook for each mode. If the customer closes the browser before returning to your store, the webhook is what triggers the status check. Without it, the order can stay Pending payment. The plugin shows a separate Test and Live webhook URL; register each one in the matching webhook configuration in the Merchant Dashboard. See Plugin Settings.
Billing phone required. The WooCommerce checkout must include a valid billing phone number. The phone number is required for Apple Pay and gateway processing.
Setup guides
Related docs
Updated about 2 months ago

