What is Claude Code? Watch It Fix a Stripe Webhook Live

Last Tuesday a client's Stripe webhook started failing silently. Customers paid, got no download, opened tickets. A freelancer quoted 350 euros and 48 hours. I fixed it in four minutes from my terminal, the owner watching over a Telegram screen share. The interesting part isn't the speed — it's that the owner didn't need a developer to be in the loop anymore for this class of problem.
What Claude Code actually is (and isn't)
Claude Code is a terminal agent. It reads your codebase, edits files, runs commands, and waits for your approval at each step. That's the entire product.
The distinction that matters: claude.ai, the chat interface, gives you code to paste. You're still the one opening files, copying snippets, running npm test, and praying. Claude Code is the one doing the pasting. You become the reviewer.
- Chat interface → you're the typist. The model is the advisor.
- Claude Code → the model is the typist. You're the approver.
That mental shift is the whole point. Stop thinking "AI helps me code." Start thinking "AI codes, I decide what ships."
cd ~/projects/client-store
claude
> read routes/webhooks.js, compare against stripe version in package.json,
find why signature verification fails after last deploy, propose fix before changing anything
That's it. No IDE plugin, no GUI, no SaaS dashboard. A terminal in the project folder.
The actual webhook fix, step by step
Setup: small e-commerce client sells digital products. Customer pays → Stripe webhook → Node backend → unlock download + send receipt email. After the last deploy, the webhook returned 400s on signature verification. Stripe retried, gave up, customers got nothing.
Here's what Claude Code did in roughly 30 seconds of analysis:
- Read
routes/webhooks.jsandpackage.json. - Noticed
stripehad been bumped to a new major version during the lastnpm install. - Identified that the signature constructor now expects a different argument shape than the handler was passing.
- Proposed three edits before touching anything.
The proposed diff for the handler looked roughly like this:
// before
const event = stripe.webhooks.constructEvent(
req.body,
sig,
process.env.STRIPE_WEBHOOK_SECRET
);
// after — new lib expects the raw buffer, not the parsed body
const event = stripe.webhooks.constructEvent(
req.rawBody, // express.raw() middleware now required
sig,
process.env.STRIPE_WEBHOOK_SECRET
);
Plus a missing env check in the config loader:
if (!process.env.STRIPE_WEBHOOK_SECRET) {
throw new Error('STRIPE_WEBHOOK_SECRET is required');
}
Plus one new test case simulating a signed payload. I read each diff, approved each one. It asked permission to run the test suite — approved. Tests passed. It asked permission to deploy — approved. Deploy ran, new version live, I sent a test payment through stripe trigger payment_intent.succeeded and the webhook fired correctly.
Total wall-clock: 4 minutes from prompt to production.
The prompt is the entire job
Earlier in the day, on a different project, I deliberately typed fix the webhook to show a client the failure mode. Claude Code rewrote the entire handler, downgraded the Stripe library, and broke two unrelated endpoints. Vague prompt, vague disaster.
The prompt that worked was specific in four ways:
- Where to look —
routes/webhooks.jsandpackage.json. - What to compare — handler code vs. installed Stripe version.
- The symptom — signature verification failing after last deploy.
- The guardrail — propose before acting.
That last clause is non-negotiable. Without it, the agent will confidently do the wrong thing and you won't know until production breaks. With it, you get a diff to read before any file gets touched.
Think project manager briefing a contractor, not chatbot user asking a question. If you can't describe the problem clearly to a human contractor, Claude Code can't solve it for you either.
The approval loop is the safety net
Every Claude Code action waits for explicit approval. The session for the webhook fix looked roughly like:
[claude] I'd like to edit routes/webhooks.js. Show diff? (y/n)
> y
[claude] Apply this edit? (y/n)
> y
[claude] I'd like to edit config/env.js. Show diff? (y/n)
> y
[claude] Apply this edit? (y/n)
> y
[claude] Run `npm test`? (y/n)
> y
[claude] Run `./deploy.sh production`? (y/n)
> y
Six approvals. Each one is a place where you, the owner, can stop the train. You don't need to understand every line of the diff — you need to understand whether the change matches what you asked for. "Is it editing the webhook handler? Yes. Is it touching the billing module I didn't mention? No. Proceed."
You can also configure auto-approval for read-only commands and require manual approval for writes and shell execution. For client work I keep writes and shell commands manual. Always.
Where this stops working
Claude Code is not a replacement for an engineer on hard problems. It's a replacement for an engineer on small, well-scoped problems. The 80% of tickets that used to cost 300 euros and 48 hours.
Things it handles well:
- Webhook signature fixes, env variable updates, library version bumps.
- Adding a field to an API response, patching a broken cron job.
- Renaming routes, updating email templates, fixing a regex.
- Writing the one missing test case that catches the bug you just had.
Things you still want a human for:
- Architectural decisions (which database, which queue, which auth model).
- Anything touching live customer data without a staging environment.
- Codebases so tangled that even a senior engineer would need a week to map them.
- Anything where "what success looks like" can't be written in two sentences.
The honest split in my client work: roughly 80% of incoming tickets fall in the first bucket. That used to be developer revenue. It's now Claude Code revenue, which is to say — almost nothing, because the model usage cost for that webhook fix was under a dollar.
Why bizflowai.io helps with this
A lot of what bizflowai.io sets up for clients is exactly this layer — the agent loop sitting between an owner and their existing systems, so small operational fixes don't require booking developer time. Webhook monitoring with auto-proposed patches, env config validation on deploy, cron-job watchdogs that draft the fix and wait for an owner approval over Telegram. The owner stays the decision-maker; the agent does the typing and waits for y.
Frequently asked questions
What is Claude Code?
Claude Code is a terminal-based agent that reads your codebase, edits files, and runs commands, pausing for your approval at each step. Unlike the Claude.ai chat interface, which gives you code to copy and paste, Claude Code performs the actions itself while you act as the reviewer. You approve or reject each proposed change, diff, test run, or deployment before it executes.
How do I write a good prompt for Claude Code?
Think like a project manager briefing a contractor. Tell Claude Code where to look (specific file paths), what to compare it against, what symptom you're seeing, and instruct it to propose changes before acting. Vague prompts like 'fix the webhook' cause it to rewrite too much and break unrelated code. Specific, scoped prompts with a proposal step prevent confident mistakes.
Why does the proposal step matter in Claude Code?
The proposal step is the guardrail that keeps Claude Code from confidently doing the wrong thing. Requiring it to describe planned edits before executing lets you review each diff, approve test runs, and authorize deployments separately. Without this step, the agent can rewrite handlers, swap library versions, and break other endpoints. With it, you stay in control of every file change and command.
When should I not use Claude Code?
Avoid Claude Code for tasks requiring deep architectural decisions, anything touching customer data without a staging environment, or codebases so messy that even a human would need a week to map them. It works best for small, well-scoped changes like webhook fixes, environment variable updates, adding fields to API responses, or patching broken cron jobs.
How is Claude Code different from Claude.ai chat?
Claude.ai gives you code snippets to paste, leaving you to open files, copy code, run commands, and debug. Claude Code reverses the roles: the agent opens files, edits them, runs tests, and deploys, while you become the reviewer approving each step. This shift removes the manual execution layer, turning the developer from typist into supervisor for small, well-defined tasks.
Want more like this?
I publish practical AI automation, GenAI engineering, and faceless content workflows on YouTube every week.
Subscribe to bizflowai.io on YouTube — never miss a new tutorial.
Planning an AI automation project or need a second opinion on your architecture?
Connect with me on LinkedIn — Lazar Milicevic, GenAI Engineer & bizflowai.io Founder.
Visit bizflowai.io for our services, case studies, and AI consulting.
Frequently asked questions
What is Claude Code?
Claude Code is a terminal-based agent that reads your codebase, edits files, and runs commands, pausing for your approval at each step. Unlike the Claude.ai chat interface, which gives you code to copy and paste, Claude Code performs the actions itself while you act as the reviewer. You approve or reject each proposed change, diff, test run, or deployment before it executes.
How do I write a good prompt for Claude Code?
Think like a project manager briefing a contractor. Tell Claude Code where to look (specific file paths), what to compare it against, what symptom you're seeing, and instruct it to propose changes before acting. Vague prompts like 'fix the webhook' cause it to rewrite too much and break unrelated code. Specific, scoped prompts with a proposal step prevent confident mistakes.
Why does the proposal step matter in Claude Code?
The proposal step is the guardrail that keeps Claude Code from confidently doing the wrong thing. Requiring it to describe planned edits before executing lets you review each diff, approve test runs, and authorize deployments separately. Without this step, the agent can rewrite handlers, swap library versions, and break other endpoints. With it, you stay in control of every file change and command.
When should I not use Claude Code?
Avoid Claude Code for tasks requiring deep architectural decisions, anything touching customer data without a staging environment, or codebases so messy that even a human would need a week to map them. It works best for small, well-scoped changes like webhook fixes, environment variable updates, adding fields to API responses, or patching broken cron jobs.
How is Claude Code different from Claude.ai chat?
Claude.ai gives you code snippets to paste, leaving you to open files, copy code, run commands, and debug. Claude Code reverses the roles: the agent opens files, edits them, runs tests, and deploys, while you become the reviewer approving each step. This shift removes the manual execution layer, turning the developer from typist into supervisor for small, well-defined tasks.