Test Mode
Build and test your store, checkout, API integration and webhooks with test payments, without touching your live store or moving real money.
Every workspace has two separate sets of data: Live and Test. In Test Mode the Dashboard shows only test data: test products, orders, users, subscriptions, webhooks and API keys. Your live catalog, orders and payouts are never touched.
You don't need a separate testing account anymore: Test Mode lives right inside your workspace on app.fungies.io.
How to turn on Test Mode
- Log in to the Fungies Dashboard.
- At the bottom of the left menu, find the Test Mode / Live Mode switch (just above Affiliate Management).
- Click Test Mode.
- The first time you switch, Fungies sets up your test environment. You'll see "Setting up your test environmentβ¦" under the switch. This can take a few minutes, and your live store keeps working as normal. If it takes longer, click Retry.
- The Dashboard reloads in Test Mode. A purple TEST MODE banner at the top of every page reminds you that you are looking at test data only.
The Test Mode / Live Mode switch at the bottom of the left menu
Where to find the switch in the Dashboard
In Test Mode, a purple banner on every page shows you are working with test data
To go back to your real store, click Live Mode in the same place. The button for the mode you are in is highlighted: purple for Test Mode, green for Live Mode.
Don't see the switch? Test Mode is being rolled out workspace by workspace. Email support@fungies.io and we'll turn it on for your workspace.
What's different in Test Mode
- Separate data. Test Mode starts empty. Products, prices, discounts, users and orders you create in Test Mode exist only in Test Mode, and nothing you do there appears in Live Mode.
- No real money. Checkout charges Stripe's test environment, so you pay with test cards and no money moves. You can test checkout before your workspace is verified or your Stripe account is connected.
- Not counted as sales. Test orders never count towards your revenue, payouts, fees or reports.
- E-mails go to you. Buyer e-mails (receipts, keys, downloads) are sent only to the workspace owner's e-mail address, with
[TEST]at the start of the subject, never to the e-mail typed at checkout. - Test documents. Invoices are numbered
TEST-β¦and credit notesTEST-CN-β¦, and their PDFs carry a TEST watermark. - A separate test store. Click Go to Store while in Test Mode to open your test storefront. It has its own address, opens only for you, and is hidden from search engines. Checkouts on it show a "Test mode" note.
- Not available in Test Mode: payment links, hosted checkout links, checkout links and embed snippets, and customer portal links. Payment methods that have no test version are hidden at checkout.
Making a test payment
- In Test Mode, add a product (see Add Subscription Product or Add One Time Payments).
- Click Go to Store and buy the product.
- Pay with the test card
4242 4242 4242 4242, any future expiry date and any 3-digit CVC. - The order appears in Transactions β Orders in Test Mode, and the receipt arrives in the workspace owner's inbox with
[TEST]in the subject.
More test cards (declines, 3D Secure, specific countries and brands) are listed in Test Payments.
Using the API in Test Mode
Test Mode has its own API keys, so your integration can read and write test data while your live keys keep working on live data.
- Switch to Test Mode.
- Go to Developers β API Keys and click Generate API Key, the same way as described in Getting Started with the API.
- Your test keys start with
pub_test_(public key) andsec_test_(secret key). Live keys start withpub_andsec_.
Test keys use the same API address and endpoints as live keys. The key decides which data you get:
| Key | Reads and writes |
|---|---|
pub_test_β¦ / sec_test_β¦ (made in Test Mode) | Test data only |
pub_β¦ / sec_β¦ (made in Live Mode) | Live data only |
For example, this lists your test orders:
curl --request GET \
--url https://api.fungies.io/v0/orders/list \
--header 'x-fngs-public-key: pub_test_YOUR_TEST_PUBLIC_KEY'Write requests (POST, PATCH, DELETE) also need the test secret key in x-fngs-secret-key, exactly like live requests.
If a test key returns 401 Unauthorized, your workspace hasn't set up Test Mode yet: switch to Test Mode in the Dashboard once and try again.
Keep test and live keys in separate environment variables (for example
FUNGIES_PUBLIC_KEYfor production and a test key in your development.env). Going live is then just a change of keys, with no code changes.
Using webhooks in Test Mode
Webhooks are separate per mode too. A webhook you create in Test Mode only receives events from test activity (test orders, payments and subscriptions), and a webhook you create in Live Mode only receives live events.
- Switch to Test Mode.
- Go to Developers β Webhooks and create a webhook, as described in Using Webhooks. For testing, point it at your development server (for example through an ngrok tunnel) or a webhook.site URL.
- Copy the webhook's secret and use it to verify the
x-fngs-signatureheader in your handler. Each webhook has its own secret, so your test and live endpoints use different secrets. - Make a test purchase. Fungies sends the matching events, such as
payment_successorsubscription_created, to your test webhook. See Types of Webhooks for every event.
You can also click Test on a webhook to send a sample event without making a purchase. Sample events have "testMode": true in the payload.
Resetting your test data
To start again from an empty test environment, switch to Test Mode and go to Settings β General β Wipe test data.
- All test products, orders, users and other test data are deleted, together with your test webhooks.
- Your test API keys are kept, so your integration keeps working.
- Your live store is not affected.
- The Dashboard switches to Live Mode while the reset runs, and the switch at the bottom of the left menu shows "Resetting test dataβ¦". When it's done, click Test Mode again.
Going live
When everything works in Test Mode:
- Click Live Mode at the bottom of the left menu.
- Create your real products. Test products are not copied to Live Mode.
- Generate live API keys (
pub_β¦/sec_β¦) in Developers β API Keys and use them in production. - Create your production webhooks in Live Mode, and use their new secrets in your production handler.
- Make sure your workspace is verified and your Stripe account is connected so you can get paid.