Refunds, Testing & Troubleshooting

Test DigetPay payments, process refunds, prepare your OpenCart store for production, and troubleshoot common integration issues.

Test payment

  1. In the extension settings, set Environment to Test (api.digetpay.com) and make sure your Test API Key is filled in.
  2. Make sure the store currency is SAR and the customer telephone field is filled in at checkout.
  3. Add a product to your cart and proceed to checkout.
  4. Select DigetPay, click Pay with DigetPay, and complete the payment on the hosted page.
  1. Confirm the order status changes to your Paid order status (default: Complete on 3.x, Processing on 4.x), with the order history note "DigetPay payment confirmed...".

Use the Test Cards with your Test API Key. See the Testing Guide for the full test flow.

Test scenarios

ScenarioHow to testExpected result
Successful paymentPay with an approved Test CardOrder moves to the Paid order status; gateway transaction ID saved
Declined paymentPay with a declined Test CardOrder moves to the Failed order status; customer sees a "Payment not completed" page
Payment not finalReturn before DigetPay has a final resultCustomer sees a "Payment awaiting verification" page; order stays pending until verified
Browser closedPay, then close the browser before returning to the storeThe webhook triggers the status check and the order is updated
Duplicate webhookSame notification delivered twiceNo duplicate order history or status changes
Full refundSee RefundsOrder moves to the full refund status after DigetPay confirms the refund
Partial refundSee RefundsOrder moves to the partial refund status after DigetPay confirms the refund

Refunds

Refunds are sent to DigetPay with the original gateway transaction ID. The order status changes only after DigetPay confirms the refund.

OpenCart 3.x

  1. In the extension settings, set Enable Admin Refunds to Enabled and save. It is disabled by default.
  2. On the same page, enter the order number in Manage Order Refund and click Open Refund Manager.
  3. Choose Full refund (remaining balance) or Partial refund and enter the amount.
  4. For a Live order, type REFUND LIVE to confirm.
  5. Click Submit refund to DigetPay, then Refresh gateway status until the refund is confirmed.

OpenCart 4.x

  1. Open the order in Sales → Orders.
  2. In the DigetPay Refund panel on the order page, choose Full Refund or Partial Refund and enter the amount.
  3. For a Live order, type REFUND LIVE to confirm.
  4. Submit the refund, then refresh the gateway status until the refund is confirmed.
🚧

One refund at a time. A refund that DigetPay has accepted is not yet final. The extension blocks a new refund for the same order until DigetPay confirms the previous one. Do not retry a refund when the result is unknown; check it in the Merchant Dashboard first.

📘

Refunds require a confirmed payment with a saved gateway transaction ID. If the order never left Pending, the payment was not confirmed. Check the webhook and the payment in the Merchant Dashboard first.


Go live

  1. Enter your Live API Key.
  2. Make sure the webhook URL is registered in the Live webhook configuration in the Merchant Dashboard (the same URL as Test).
  3. Set Environment to Live (api.digetpay.com) and save.
  4. Place one real low-value order, then refund it and verify the transaction and refund in the dashboard.

Orders created in Test keep using the Test API Key for status checks and refunds.

Go-Live Checklist →


Common issues

ProblemFix
Order stuck on PendingRegister the HTTPS webhook URL in both Test and Live webhook configurations. Turn on Debug log and check digetpay.log.
DigetPay missing at checkoutMake sure Status is Enabled, the API key for the selected Environment is filled in, and the checkout currency is SAR.
"DigetPay accepts SAR payments only."Set the store or checkout currency to SAR.
Payment can't be createdCheck that the customer telephone is filled in and the store URL is public HTTPS. Check digetpay.log for the API error.
Payment succeeds, no webhookCheck whether a firewall is blocking the POST request, and that the webhook URL exactly matches the one shown in the extension settings.
Webhook URL shows http:// or localhostSet the store to HTTPS, or fill in Public HTTPS URL, save, and copy the URL again.
Refund not available3.x: turn on Enable Admin Refunds. Both: the payment must be confirmed with a gateway transaction ID, and any earlier refund must be confirmed first.
Refund status not updatedAn accepted refund may still be pending. Use Refresh gateway status and check the refund in the Merchant Dashboard.
SSL errorsInstall a valid SSL certificate. HTTP stores are not supported.

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


Developer reference

OpenCart 3.x

ItemValue
Payment routeextension/payment/digetpay
Webhookindex.php?route=extension/payment/digetpay/webhook
Return URLindex.php?route=extension/payment/digetpay/returned
Create checkoutPOST /payment/checkout/intiate
Payment statusGET /payment/checkout/status?sessionId=
RefundPOST /payment/refund
AuthHeader x-api-key (Test or Live API Key)
Log filedigetpay.log

OpenCart 4.x

ItemValue
Payment routeextension/digetpay/payment/digetpay
Webhookindex.php?route=extension/digetpay/payment/digetpay.webhook
Return URLindex.php?route=extension/digetpay/payment/digetpay.returned
Create checkoutPOST /payment/checkout/intiate
Payment statusGET /payment/checkout/status?sessionId=
RefundPOST /payment/refund
AuthHeader x-api-key (Test or Live API Key)
Log filedigetpay.log

Both versions use the API base URL https://api.digetpay.com/v1.


Did this page help you?