James opened WhatsApp. He had spent the last two chapters building tier gating and Stripe checkout. The tools worked in isolation: check_tier blocked free users from premium content, and get_upgrade_url created a real Stripe checkout link. But he had never tested the full journey. Free learner hits a paywall, gets an upgrade link, pays, comes back, and the content unlocks.
"I want to try the whole thing," he told Emma. "Start to finish. As if I were a real customer."
"You are a real customer. You built the product and you are about to buy it from yourself." She pointed at his phone. "Go."
You are doing exactly what James is doing. The complete customer journey, from paywall to payment to unlocked content. Then you add payment tests to the pytest suite so the journey is verified automatically.
Make sure your TutorClaw server is running and connected to OpenClaw. Your test learner should be on the free tier. If you upgraded your test learner in Module 9.3, Chapter 14, reset the tier to "free" in your JSON state file, or register a new learner.
Pick up your phone. Send this message to your agent via WhatsApp:
Chapter 6 is beyond the free tier limit (chapters 1 through 5). The agent should:
Open the dashboard. Find the message log. You should see two tool badges:
Both tool badges confirm the agent made the correct decisions. It did not fabricate a response. It hit the paywall, recognized the error, and offered the upgrade path.
Open the Stripe checkout link from the agent's response in your browser. You are now looking at a real Stripe checkout page running in test mode.
Enter the test card details:
Click pay. Stripe processes the test payment and redirects you to the success page.
Behind the scenes, Stripe sends a checkout.session.completed webhook to your server. Your webhook handler (from Module 9.3, Chapter 14) receives the event, extracts the learner ID from the session metadata, and updates the tier in your JSON state file from "free" to "paid."
Your Stripe CLI needs to be forwarding webhooks to your local server. If you stopped it since Module 9.3, Chapter 14, restart it:
Without the CLI forwarding, the webhook never reaches your server and the tier never updates.
Before sending another WhatsApp message, confirm the tier actually changed. Ask Claude Code:
Claude Code reads the JSON file and confirms the tier value. If the tier is still "free," the webhook did not fire or the handler did not update the file. Check the Stripe CLI terminal for webhook delivery logs and your server logs for errors.
Send the same message via WhatsApp:
This time the agent should:
Open the dashboard. The tool badges for this second message should show:
Compare the two messages side by side in the dashboard:
That is the complete customer journey. A free learner hit a wall, paid for access, and received the product. All verified through tool badges, not just chat text.
The WhatsApp journey proves the flow works today. Automated tests prove it keeps working tomorrow. Open Claude Code in your tutorclaw-mcp project and describe the payment test requirements:
Notice what this prompt specifies:
Claude Code generates tests/test_payment_flow.py. The tests mock the Stripe API so they run without network access, without a Stripe account, and without the Stripe CLI.
All existing tests from Module 9.3, Chapters 11 and 12 should still pass. The four new payment tests should pass on top of them. If a payment test fails, describe the failure to Claude Code:
Same describe-steer-verify cycle. Same workflow. Now applied to payment logic.
James watched the test output scroll. Green lines. Every test from the original suite. Then four more green lines from the payment tests.
"Full green." He sat back. "Tools, content, tier gating, payment, tests. All passing."
Emma looked over his shoulder at the test count. "You just paid for your own product. With a test card, through a real checkout page, from your phone. And the tests prove the whole chain works even when you are not manually clicking through it."
"I built a product that makes money and the tests prove it works."
Emma nodded slowly. "You have a product. Tools, content, tier gating, payment. All working. All tested." She paused. "But the agent has no personality. Ask it who it is."
James typed into WhatsApp: "Who are you?"
The response came back generic. A default OpenClaw greeting. No name. No teaching philosophy. No identity.
"It does not know what it is," James said.
"Every product I have built, identity was the last thing I added. Every time I wished I had added it sooner." Emma shrugged. "The product works. The business logic is solid. But the agent sounds like every other agent. Module 9.3, Chapter 16 fixes that."
What you are learning: Webhook debugging follows a chain: Stripe sends the event, the CLI forwards it, your server receives it, the handler processes it, the JSON file updates. A break at any link produces the same symptom (tier unchanged). Learning to trace the chain stage by stage is the diagnostic skill that transfers to any webhook integration.
What you are learning: Designing test scenarios before writing test code is the same matrix-first approach from Module 9.3, Chapter 11. Refunds introduce state transitions that go backward (paid to free), which creates edge cases that forward-only flows do not have. Thinking through edge cases on paper prevents gaps in coverage.
What you are learning: Manual integration tests verify the full chain including external services (Stripe, OpenClaw gateway, WhatsApp). Automated tests verify internal logic without network dependencies. Neither replaces the other. Knowing when to invest in each saves time without sacrificing confidence.