Skip to content

Knowledgebase

Testing a payment gateway in sandbox mode

wordpress

Test a payment gateway in its documented sandbox or test mode before accepting real customer payments. Use a protected staging store and the provider's test credentials so you can verify successful payments, failures and callbacks without creating unintended live charges.

01 Prepare the test environment

Back up the site and isolate the staging copy from fulfilment, accounting, subscription renewals and customer mail. Test orders can still trigger normal WooCommerce actions and may not be distinguishable to every extension. A gateway's test switch does not automatically put every connected service into test mode.

02 Configure and run test cases

  1. Open the installed gateway's official current documentation and confirm its supported sandbox process.
  2. Enable its test environment and use credentials issued for that environment.
  3. Configure test webhook or callback URLs and secrets if the provider requires them.
  4. Use only the provider's documented test payment data.
  5. Place a successful order and verify its payment reference, WooCommerce status and stock behaviour.
  6. Test a decline, abandoned payment and any supported authentication challenge, then review the order notes and provider dashboard.

Can I test with my real card in sandbox mode?

Use the provider's official test data. Real card details are unnecessary for sandbox testing and should not be entered into an uncertain environment. Never paste card numbers, security codes or gateway secrets into support tickets or application logs.

Why does the browser show success but the order remain pending?

The customer return page and the server-to-server payment notification are separate parts of many integrations. Verify webhook delivery, signature configuration and the gateway's order notes. A return-page message alone is not proof that the store received final payment confirmation.

03 Record evidence and clean up

Keep test case names, timestamps, order IDs and non-sensitive transaction references. Confirm refunds or voids in the sandbox if the gateway supports them. Remove or clearly segregate test orders and restore test inventory according to the test plan, without deleting real transactions. Before launch, follow a separate live-mode checklist and verify that the production domain, credentials and callbacks match the approved merchant account.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support