Module 4 · 4.5
English
A test order from start to finish
Module 4: VAT, shipping and payments · Reading time: 10 minutes
Learning objective: After this lesson you can fully test an order in test mode, follow and explain the order statuses, track down problems with webhooks and emails, and then tidy up properly.
Key concepts: test mode, test payment, test card, order statuses (Pending payment, Processing, On hold, Completed, Cancelled, Failed, Refunded, Draft), webhook log, order notes, order emails, hold stock, test checklist, cleaning up
Why a full test
A shop can look perfect and still not sell. The cart works, checkout works, the customer pays, and then the order stays on "Pending payment" because the webhook never arrives (lesson 4.4). Or the confirmation email lands in spam. Or the VAT on shipping is missing. You only notice when the first customer calls. A full test order runs through the whole chain, from product page to refund, before a real customer does. Repeat it after every major change: a different payment plugin, a new theme, a WooCommerce update, a cache setting.
Test mode at your payment provider
Every serious payment provider has a test mode: your shop talks to the provider's test environment, no real money changes hands, and you can choose whether a payment succeeds or fails. For card payments you use the test cards listed in the provider's documentation, never your own card. For iDEAL | Wero and similar methods, the test environment usually shows a choice screen: paid, failed, cancelled, expired.
Turn on test mode in the settings of the payment plugin. If your shop is already live, test in a staging environment (lesson 7.3 and WordPress course lesson 8.3), so real customers don't accidentally pay in test mode. And turn off emails to customers in staging, except to your own test address.
The order statuses
WooCommerce has these statuses. What they mean in practice:
| Status | Meaning | What you do |
|---|---|---|
| Draft | The customer is checking out with the checkout blocks; not ordered yet | Nothing; WooCommerce cleans up old drafts |
| Pending payment | Order created, payment not yet confirmed | Wait; if it stays that way, check the webhook |
| Failed | Payment failed or was declined | Don't ship anything; sometimes the customer tries again |
| Processing | Paid, stock reduced, not yet shipped | Pack and ship |
| On hold | Waiting for something, such as a bank transfer | Check whether the money has arrived |
| Completed | Shipped and done | Nothing more, except for a return |
| Cancelled | Cancelled by you, the customer or automatically | Stock goes back |
| Refunded | Fully refunded | Update your records (lesson 6.5) |
A few things happen automatically. With Pending payment, WooCommerce holds the stock; after the number of minutes set under Hold stock (lesson 3.4), an unpaid order is cancelled. With Processing, WooCommerce sends the customer the "Processing order" email and you the "New order" email. With Completed, the customer receives the "Completed order" email. For products that are both virtual and downloadable, WooCommerce sets a paid order straight to Completed, because there is nothing to ship.
The test, step by step
This is how Theehuis Example tests, in a private window, as a guest:
- Product page: is the price including VAT correct, with the suffix (lesson 4.1)?
- Cart: a teapot (class "Fragile") and a packet of tea (reduced rate). Are the subtotal, shipping costs and VAT correct?
- Checkout with a Dutch address, then with a Belgian address: do the right shipping methods (lesson 4.3) and the right VAT (lesson 4.2) appear?
- Order button: does it show text that mentions the obligation to pay, plus a link to the terms and the withdrawal information (lesson 5.4)?
- Payment succeeded in test mode. Look in WooCommerce > Orders: which status, and how quickly did it change? Open the order and read the order notes on the right: the payment plugin writes down what the provider reported.
- Payment failed or cancelled: a second order, this time with a failed test payment. Which status? Was the stock restored?
- Emails: did the email to the customer and the email to you arrive? Read them as a customer would: do they include your details, the withdrawal information and the button (lessons 5.3 and 6.1)?
- Refund: refund the successful test order from WooCommerce (the Refund button in the order, lesson 6.5). Do you also see the refund in the provider's dashboard?
- Clean up: delete test orders and test customers, or give them a clear note, so they don't end up in your turnover and your OSS counter.
When things go wrong
- Status stays on "Pending payment": check the payment plugin's log (often WooCommerce > Status > Logs) to see whether the webhook came in. It didn't? Check that your shop can be reached from outside (no password on staging for the webhook, no firewall or security rule blocking it, no maintenance mode).
- No email: check the sender and whether the email is in spam (lesson 6.1). If the email to you arrives but the one to the customer doesn't, check whether the "Processing order" email is enabled under WooCommerce > Settings > Emails.
- VAT is wrong: compare the product's tax class, the rate table and the address (lesson 4.1).
- No shipping methods: which zone does this address fall into (lesson 4.3)?
Summary
- Test the whole chain in test mode, also after every major change, preferably in staging.
- Know the statuses: Pending payment, Processing, On hold, Completed, Cancelled, Failed, Refunded and Draft.
- An order that stays on "Pending payment" after a successful payment almost always points to the webhook.
- Read the order notes and the payment plugin's log; read the emails as a customer would.
- Clean up test orders so they don't end up in your turnover and VAT counts.
Quiz
Exercise
Exercise D4.5: A test order from start to finish. Follow the nine steps from this lesson in your own shop or test shop.
Checklist:
- [ ] payment provider in test mode;
- [ ] test order placed as a guest;
- [ ] payment succeeded;
- [ ] payment failed or cancelled;
- [ ] statuses seen in WooCommerce > Orders;
- [ ] email to customer and to administrator received;
- [ ] order refunded in test mode;
- [ ] test orders cleaned up or marked as test.
Questions:
- Which statuses did the successful and the failed order get, and in which order?
- How long did it take for the status to change (the webhook)?
- What was in the confirmation email, and what was missing?
After "done" you'll see a sample answer: the successful order went from Pending payment to Processing; the failed one from Pending payment to Failed or Cancelled; one specific item missing from the email, for example the withdrawal information (lesson 5.4).
Exercise D4.5: A test order from start to finish
You do this exercise yourself; no one checks it. Tick off what you've done and mark the exercise as done.
Successful: Pending payment, Processing. Failed: Pending payment, Failed or Cancelled. One specific item missing from the email (for example withdrawal information, lesson 5.4).
Your ticks and notes only stay in this browser; we don't send them anywhere. If you're signed in, we only save in My courses that you've done the exercise.
Further reading
- DirectAdmin guide 18.10: I can't send email
- Free WordPress course 8.3: Staging: testing safely
- Managing orders (woocommerce.com): https://woocommerce.com/document/managing-orders/
- WooCommerce refunds (woocommerce.com): https://woocommerce.com/document/woocommerce-refunds/
