Refunds, Testing & Troubleshooting
Test DigetPay payments, process refunds, prepare your OpenCart store for production, and troubleshoot common integration issues.
Test payment
- In the extension settings, set Environment to Test (api.digetpay.com) and make sure your Test API Key is filled in.
- Make sure the store currency is SAR and the customer telephone field is filled in at checkout.
- Add a product to your cart and proceed to checkout.
- Select DigetPay, click Pay with DigetPay, and complete the payment on the hosted page.
- 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
| Scenario | How to test | Expected result |
|---|---|---|
| Successful payment | Pay with an approved Test Card | Order moves to the Paid order status; gateway transaction ID saved |
| Declined payment | Pay with a declined Test Card | Order moves to the Failed order status; customer sees a "Payment not completed" page |
| Payment not final | Return before DigetPay has a final result | Customer sees a "Payment awaiting verification" page; order stays pending until verified |
| Browser closed | Pay, then close the browser before returning to the store | The webhook triggers the status check and the order is updated |
| Duplicate webhook | Same notification delivered twice | No duplicate order history or status changes |
| Full refund | See Refunds | Order moves to the full refund status after DigetPay confirms the refund |
| Partial refund | See Refunds | Order 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
- In the extension settings, set Enable Admin Refunds to Enabled and save. It is disabled by default.
- On the same page, enter the order number in Manage Order Refund and click Open Refund Manager.
- Choose Full refund (remaining balance) or Partial refund and enter the amount.
- For a Live order, type REFUND LIVE to confirm.
- Click Submit refund to DigetPay, then Refresh gateway status until the refund is confirmed.
OpenCart 4.x
- Open the order in Sales → Orders.
- In the DigetPay Refund panel on the order page, choose Full Refund or Partial Refund and enter the amount.
- For a Live order, type REFUND LIVE to confirm.
- 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
- Enter your Live API Key.
- Make sure the webhook URL is registered in the Live webhook configuration in the Merchant Dashboard (the same URL as Test).
- Set Environment to Live (api.digetpay.com) and save.
- 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.
Common issues
| Problem | Fix |
|---|---|
| Order stuck on Pending | Register the HTTPS webhook URL in both Test and Live webhook configurations. Turn on Debug log and check digetpay.log. |
| DigetPay missing at checkout | Make 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 created | Check that the customer telephone is filled in and the store URL is public HTTPS. Check digetpay.log for the API error. |
| Payment succeeds, no webhook | Check 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 localhost | Set the store to HTTPS, or fill in Public HTTPS URL, save, and copy the URL again. |
| Refund not available | 3.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 updated | An accepted refund may still be pending. Use Refresh gateway status and check the refund in the Merchant Dashboard. |
| SSL errors | Install 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
| Item | Value |
|---|---|
| Payment route | extension/payment/digetpay |
| Webhook | index.php?route=extension/payment/digetpay/webhook |
| Return URL | index.php?route=extension/payment/digetpay/returned |
| Create checkout | POST /payment/checkout/intiate |
| Payment status | GET /payment/checkout/status?sessionId= |
| Refund | POST /payment/refund |
| Auth | Header x-api-key (Test or Live API Key) |
| Log file | digetpay.log |
OpenCart 4.x
| Item | Value |
|---|---|
| Payment route | extension/digetpay/payment/digetpay |
| Webhook | index.php?route=extension/digetpay/payment/digetpay.webhook |
| Return URL | index.php?route=extension/digetpay/payment/digetpay.returned |
| Create checkout | POST /payment/checkout/intiate |
| Payment status | GET /payment/checkout/status?sessionId= |
| Refund | POST /payment/refund |
| Auth | Header x-api-key (Test or Live API Key) |
| Log file | digetpay.log |
Both versions use the API base URL https://api.digetpay.com/v1.
Updated about 2 months ago

