← All posts

Test your integration without real money

PayerNex Team · · 2 min read

When you connect a store to a payment gateway, you need to see the whole loop work: an order is created, the buyer reaches checkout, the payment completes, and your store receives the webhook and fulfils the order. Doing that with real money every time is slow and risky. Test mode lets you run it as often as you like.

Get a test key

Go to Dashboard → Developer → Test mode key and create a key. It starts with test_ and works with the same endpoints as your live key.

curl https://payernex.com/api/v1/create-order \
  -H "Authorization: Bearer test_..." \
  -H "Content-Type: application/json" \
  -d '{"amount": 25, "currency": "USD", "ipn_url": "https://your-site.example/ipn"}'

The response includes "test": true.

How test orders behave

  • A test order opens a test checkout with two buttons: Simulate successful payment and Simulate expiry (unpaid).
  • Simulate successful payment marks the order paid and sends your ipn_url the normal signed webhook, with an extra "test": true field.
  • Test orders don't need an active subscription and don't count towards your monthly order limit.
  • They are kept apart from your real business. They never appear in your live order list, statistics, plan limits or payment matching, and a live key can't read them. You can still see them under Orders → Test orders.

What to check

  1. Your store creates the order and redirects the buyer to checkout_url.
  2. Your webhook handler verifies the signature. See webhooks.
  3. Your handler calls GET /api/v1/order/{order_ref} and only fulfils when the status is paid.
  4. A second identical webhook doesn't fulfil the order twice.
  5. An expired order is handled correctly.

Before you go live

Swap the test key for your live key. If you use one of our plugins, also turn off any "accept test payments" option. Anyone who holds a test checkout link can press Simulate successful payment, so a live store must never trust test orders.

The official SDKs for Node.js, PHP and Python detect test keys and handle signature checks for you.

Start accepting payments with PayerNex

Connect your own Binance, bank, crypto wallet or card gateway. The money goes straight to you.

Create a free account Read the docs