Payments in Test Mode
How online payments work, practised only with pretend money in test mode.
- Suits
- Older learners who have completed D5 and are curious about how online shops and subscriptions work. Everything is simulated; no real money or real card details are ever used.
- Before this
- Where it fits
- Level 5, Pro (16–18 and adults): Professional AI coding tools and agents, payments and servers, and a real project from idea to a maintained launch. This course is in Under the hood: The concepts and tools behind an app: files, front end and back end, data, APIs, Git, hosting and deployment.
What you'll be able to do
- Explain the steps of an online payment: checkout, approval, confirmation and webhooks.
- Explain test mode, test keys and published test cards, and why they never move real money.
- Describe why secret and restricted payment keys must stay on a server, and which key may appear in browser code.
- Explain why webhooks must be verified and why duplicate events must not cause double orders.
- Explain consumer honesty: clear prices, easy cancelling and refunds, and no pressure tricks.
Lessons
1. How online payments work
20 minCheckout, payment providers and confirmations, explained step by step.
2. Test mode and sandboxes
25 minSimulated payments with test keys and published test cards, shown in Amphicode's demo.
3. Webhooks
30 minHow a payment provider tells your server that something happened, and how to trust those messages.
4. Payment keys and safety
25 minPublishable versus secret keys, restricted keys, and keeping payment code on the server.
5. Honest prices and fair design
20 minClear pricing, easy cancelling and refunds, and avoiding pressure tricks.
How it's assessed
- Explains a payment flow in order and why the server waits for the provider's message.
- Explains test mode and why published test cards never move real money.
- Identifies which keys may appear in browser code and which stay on a server.
- Explains signature verification and duplicate handling for webhooks.
- Spots a dishonest checkout design and suggests a fair alternative.
To complete the course
- Pass each lesson check (70% or more).
- Complete the test-mode checkout and webhook simulators.
Notes for parents, guardians and teachers
- Everything in this course is simulated in the browser with pretend money. Learners never type real card or bank details, and never open a payments account.
- The test card numbers shown are numbers Stripe publishes for its sandboxes; Stripe says they only work in sandboxes. Learners choose them from a list rather than typing them.
- Stripe is introduced as an example provider. The agreement Amphicode reviewed (Stripe's GB version) requires an adult Representative, who is responsible and liable, for any account holder under 18. Rules may differ by country. Any real account is the adult's decision and should stay in test mode for this course.
- Amphicode never gives learners payment keys; all keys shown are fake.
A parent, guardian or teacher creates the account. A short placement check suggests where each learner starts.