Skip to contentTalk to us

How do I test payments on my site safely?

Updated October 12, 2026

The short answer

Test payments in the test mode your payment gateway provides, with the test cards published in its official documentation, and never use a real card or give one to any tool. Try a successful payment, a declined one, a cancellation halfway through and a refund, and confirm that the order status in your system matches what really happened. Then make one small real payment yourself before opening.

People also ask this as
  • how to test payments on my website
  • payment gateway test cards
  • test checkout without a real card
  • how do I test mada or Apple Pay before launch

Steps for testing payments

  1. 1
    Turn on test mode

    Every gateway has a test environment with separate keys. Make sure your test site uses those, not the live keys.

  2. 2
    Take test cards from the source

    Their numbers are published in the gateway's official docs, one per outcome: success, decline, insufficient funds.

  3. 3
    Try every method you offer

    Cards, wallets and installments if you have them. Each method is its own flow.

  4. 4
    Break the flow on purpose

    Close the page during verification, go back, and press pay twice.

  5. 5
    Reconcile the results

    Did the declined order stay unpaid? Did the confirmation message arrive only once?

Do and don't

Don't
  • Use your own card or a customer's card for testing
  • Write real card details in a report or a chat
  • Test on the live site with live keys by accident
Do
  • Test mode and test cards only
  • A test customer account with an obvious name
  • One small real payment before opening, then refund it

What usually gets forgotten?

  • The failure page: does it tell the customer what to do next?
  • Refunds and cancellations from the admin panel.
  • VAT and the invoice total after a discount.
  • The customer's return from the verification page to your site on a phone.

People also ask

How do I test my website before launch?

Test your website before launch in three passes. First, walk through the key flows end to end as if you were a customer: sign-up, ordering and a test payment. Second, open it on a real phone and in two different browsers. Third, review the text, links, forms and error messages. Write down every problem with steps to reproduce, and fix whatever stops a customer from finishing first.

Read the full answer
Is my site ready to launch? What should I check?

Your site is ready when a new customer can finish the main task on a phone without help, a test payment succeeds and a declined one fails correctly, Arabic and English both work, there are no broken links or leftover placeholder text, the site runs on your domain with a security certificate, and you have a backup and a way to roll back. Everything else can improve after opening.

Read the full answer
How often should I run tests on my site?

Run tests on three occasions: before every release or update, however small; after every fix, to confirm the bug is gone and nothing new appeared; and on a regular schedule even when you changed nothing, because outside services such as payments and messaging can change without telling you. A site that sells every day deserves a quick daily check and a full weekly one.

Read the full answer
How do I keep my company's data safe?

Keeping company data safe rests on four habits: a personal sign-in for every employee instead of shared accounts and files; role-based permissions so each person sees only what they need; regular backups that you have actually tested restoring; and control over who can export or delete. Most data loss in small companies comes from human error or a copied file, not a sophisticated attack.

Read the full answer

Terms used in this answer