Testing & Troubleshooting

Test DigetPay on WooCommerce, go live, and fix common checkout issues.

Test payment

Run these tests with Enable TEST mode checked, your Test API key filled in, and the TEST webhook URL registered. Use Test Cards only.

  1. Add a product → checkout.
  2. Enter billing phone (required).
  3. Under Payment options, select DigetPay → Place order.
  4. Complete payment on the DigetPay page.
  5. Confirm order status = Processing or Completed, with the order note "DigetPay payment confirmed (transaction ID)".
DigetPay payment option at WooCommerce checkout

Success: The order is marked paid only after the plugin confirms the payment with the Transaction Status API. To confirm the webhook is working, check the payment in the Merchant Dashboard and the debug log (digetpay source) for the webhook request.

Test scenarios

ScenarioHow to testExpected result
Successful paymentPay with an approved Test CardOrder Processing / Completed, transaction ID saved on the order
Declined paymentPay with a declined Test CardOrder Failed; customer returns to checkout with "DigetPay payment was not completed."
Cancelled paymentLeave the DigetPay page without payingOrder not paid; customer returns to checkout
Browser closedPay, then close the browser before returning to the storeWebhook triggers the status check and the order is updated
Duplicate webhookSame notification delivered twice, or return page reloadedNo duplicate notes or status changes
Full / partial refundOrder → Refund → amount → Refund via DigetPayNote: "DigetPay refund request accepted for X SAR; confirm final refund settlement in DigetPay."
Checkout BlocksPay from a block-based checkout page (if you use one)DigetPay appears and the payment completes
📘

A refund note means DigetPay accepted the refund request. Confirm the final refund status in the Merchant Dashboard.


Go live

  1. Enter your Live API key in the plugin settings.
  2. Register the LIVE webhook URL (...?wc-api=digetpay_webhook&environment=live) in the Live webhook configuration in the Merchant Dashboard.
  3. Uncheck Enable TEST mode and click Save changes.
  4. Run one real low-value order, then refund it.

The API base URL stays https://api.digetpay.com/v1. Orders created in Test Mode keep using the Test key for status checks and refunds.

Go-Live Checklist →


Quick fixes

ProblemFix
Order stuck on PendingRegister the webhook URL for the current mode (TEST or LIVE) on a public HTTPS store. Check the debug log.
Webhook ignoredUse the URL shown in plugin settings (with environment=test or environment=live), registered in the matching mode. The old digetpay_callback URL is no longer used.
"Phone number required" / "DigetPay could not create this payment."Enable the billing phone field at checkout. If the error continues, turn on Debug log and check WooCommerce → Status → Logs.
Plugin missing at checkoutEnable DigetPay in settings, fill in the API key for the selected mode, and set the store currency to SAR.
"Configure the DigetPay TEST API key first." (or LIVE)Add the API key for the selected mode.
"DigetPay requires a publicly accessible HTTPS WordPress site URL."Use a public HTTPS domain in Settings → General. localhost, .local and private IPs are not accepted.
401 in the debug logCheck that the key matches the selected mode (Test key in Test Mode, Live key in Live Mode).
Refund fails: "This order has no DigetPay transaction to refund."The payment was never confirmed. Check the payment in the Merchant Dashboard.
Refund fails: "Payment environment is unknown for this older order."The order was created before Test/Live support. Check and refund it from the Merchant Dashboard.
"Could not reach DigetPay."Check outbound HTTPS from your server and that the PHP cURL extension is enabled.

Need help? [email protected] — include the WooCommerce order ID, payment time, mode (Test or Live), and the relevant debug log lines. Do not send API keys.


Developer reference

ItemValue
Gateway IDdigetpay
Webhook?wc-api=digetpay_webhook&environment=test / &environment=live
Return URL?wc-api=digetpay_return
API base URLhttps://api.digetpay.com/v1 (Test and Live)
Create checkoutPOST /payment/checkout/intiate
Payment statusGET /payment/checkout/status?sessionId=
RefundPOST /payment/refund
AuthHeader x-api-key (Test or Live API key)
Debug logWooCommerce → Status → Logs, source digetpay

Full API docs: Hosted Checkout · Webhooks · Process Refund


Did this page help you?