Claude Code in Practice: Complex Payment Feature Built in 4 Hours for $60

Claude Code + Opus 4.7 delivers a full commercial payment feature in 4 hours for $60, zero code written.
This article demonstrates a proven AI Coding workflow using CCSwitch + Claude Code + Opus 4.7 to build a complex commercial payment gateway feature. Covering environment setup, model configuration, structured prompt engineering, and a real-world case study, it shows how a Go-based payment system with dual frontend themes was completed in 4 hours for ~$60—with zero hand-written code and first-run success.
AI Coding Is Ready for Real-World Production
Many people are still on the fence about whether AI programming can handle real projects. The answer is: absolutely yes. This article shares a battle-tested AI Coding workflow—from environment setup to model configuration, to a real commercial-grade payment feature development case—zero lines of hand-written code, complex payment scenarios completed in 4 hours.
Core toolchain: CCSwitch + Claude Code + Opus 4.7. This combination is virtually unbeatable for commercial-grade projects right now.
Environment Setup: Four Steps to Complete Configuration
Install Node.js
All CLI tools depend on a Node.js environment—this is step one. Node.js is a JavaScript runtime built on Chrome's V8 engine that allows JavaScript to run on the server side, outside the browser. npm (Node Package Manager) is Node.js's default package manager and the world's largest open-source software registry. AI programming tools commonly choose to build CLIs (Command Line Interfaces) on Node.js because its asynchronous I/O model is ideal for frequent communication with remote APIs, and the npm ecosystem provides rich toolchain support.
After installation, verify in your terminal:
node --version
npm --version
If both commands return version numbers, the installation was successful.
Install CLI Clients
Install the CLI tools you need:
- Claude Code (direct command install on macOS, also works on Windows):
npm install -g @anthropic-ai/claude-code - Codex:
npm install -g openai-codex - Gemini CLI: also installed globally via npm
- OpenCode:
npm i -g open-code-ai(also available via brew on macOS)
Global installation (the -g flag) means these tools can be invoked from any directory on your system, not just a specific project folder. Install only what you need—if you're only using Claude Code, one installation is enough.
Install CCSwitch—The Core Management Tool
CCSwitch is the critical hub of this entire workflow. Its purpose: unified management of model configurations across all CLI tools, bypassing login verification.
CCSwitch is essentially an API proxy configuration manager. In the AI programming space, different CLI tools each have their own model configuration methods and authentication mechanisms. CCSwitch unifies these fragmented configurations into a single graphical interface. The term "aggregation platform" refers to third-party API relay service providers that package APIs from multiple model vendors (OpenAI, Anthropic, Google, etc.) under a unified interface—users need only one API Key to access multiple models. The benefits of this architecture include: avoiding the hassle of registering accounts with each vendor, solving network access restrictions in certain regions, and enabling unified usage billing and cost control.
Go to CCSwitch's GitHub Release page and download the latest version (currently 3.0.1.5). Choose the appropriate installer for your OS (MSI for Windows, corresponding version for Mac).
Once installed, CCSwitch supports managing model configurations for the following clients:
- Claude Code CLI
- Claude Code Desktop
- Codex
- Gemini CLI
- OpenCode
- Cline
- Hermes Agent
Configure Models and Providers
Open the CCSwitch interface and click the plus icon to add a unified provider. Core configuration items include:
- API Address: Enter your aggregation platform URL
- API Key: The key obtained from your aggregation platform
- Enabled CLIs: Select the clients you want to use (e.g., check only Claude Code)

Using Claude Code as an example, you can configure multiple models: Opus 4.7, Haiku 4.5, Sonnet 4.6, etc., with the default base model set to Opus 4.7. Anthropic's Claude model family uses a tiered naming strategy: Haiku is positioned for lightweight speed, Sonnet for balance, and Opus for maximum capability. The version numbers represent iteration generations. Opus 4.7, as the current flagship model, leads the industry in code generation, long-context understanding, and complex reasoning. You can switch between models at any time in Claude Code using the /models command.
The most critical step: In CCSwitch's settings, make sure to enable "Skip Claude Code's initial installation confirmation" and apply. This eliminates the need for account registration or VPN—you can use it directly via API.
Real-World Case: Payment Feature Development Completed in 4 Hours
Project Background
This is a real commercial project—upgrading an aggregation platform by adding Shouqianba payment gateway functionality. Shouqianba is a mainstream aggregated payment service provider in China that offers merchants unified payment access, supporting Alipay, WeChat Pay, UnionPay QuickPass, and other payment channels. Project characteristics:
- Backend: Written in Go with a massive codebase. Go (Golang) is a compiled language developed by Google, known for high concurrency, high performance, and clean syntax—it's the mainstream choice for payment systems, financial backends, and infrastructure. Payment systems favor Go for several key features: goroutines provide a lightweight concurrency model that efficiently handles large volumes of concurrent payment requests; the strong type system and compile-time checks reduce runtime error risks; and the standard library includes comprehensive HTTP and cryptography support, ideal for interfacing with various payment channel APIs.
- Frontend: Needs to simultaneously support both Default and Classic UI themes
- Complexity: Secondary development on an existing complex project, requiring minimally invasive modifications. The challenge of doing secondary development on an existing Go project lies in understanding the existing architectural patterns, interface specifications, and error handling conventions, ensuring new code is consistent with the original code style without introducing regression issues. This is precisely the core test of AI programming in complex projects.
Prompt Engineering: Writing Good Requirements Is Key

If you just write "add a new payment method," the AI won't be able to handle it. The correct approach is to write a structured requirements document:
- Step one: Have the AI carefully read the overall project structure
- Backend requirements: Use a highly extensible architectural design with minimal source code modifications
- Frontend requirements: Implement payment pages for both Default and Classic themes
- Interface specifications: Reference Shouqianba's official integration documentation
- Payment scenario: C-scan-B mode (customer scans aggregated QR code, supporting Alipay/WeChat)
The "C-scan-B" mode (Customer scan Business) refers to consumers using their phones to scan a merchant's displayed aggregated QR code to complete payment, as opposed to "B-scan-C" mode (merchant scans consumer's payment code). The technical flow of C-scan-B mode is: the merchant system calls the payment gateway API to generate a dynamic QR code URL containing order information; after the user scans it, the payment gateway identifies the user's payment tool (Alipay or WeChat), automatically routes to the corresponding payment channel to complete the charge, and finally notifies the merchant system of the payment result via asynchronous callback. This process involves order creation, QR code generation, payment status polling, asynchronous notification handling, and reconciliation mechanisms.
This requirements document is the "blueprint" you hand to the AI—the clearer it is, the more precisely the AI executes.
Execution Process and Final Results
Paste the requirements into the Claude Code plugin's Chat box in VSCode, select manual confirmation mode (not fully automatic), and manually confirm at critical modification points.
Final results at a glance:
- ⏱️ Time: 4 hours
- 💰 Cost: ~$60
- ✍️ Hand-written code: 0 lines
- ✅ First-run success: Payment functionality fully operational
The AI-generated code quality was remarkably high: adopted a highly extensible architecture, minimized modifications to original code, flexible payment gateway configuration (merchant SN, keys, activation codes), and dynamic generation of terminal SA and terminal keys. Both frontend themes were fully implemented, with order creation, QR code generation, pending payment status, and reconciliation features all complete.

Why It Has to Be Claude Code + Opus 4.7
Many people ask: Can you use Claude Code with DeepSeek V4 Pro or GLM 5.1?
The answer: Technically yes, but the performance gap is enormous.
The core reason is that Claude Code is an Agent, and it has been specifically fine-tuned through reinforcement learning for the Opus model. An Agent is one of the core paradigms in current AI applications, fundamentally different from chat-style AI. An Agent possesses autonomous planning, tool invocation, environment awareness, and iterative correction capabilities—it doesn't just answer questions but can decompose tasks, execute operations, observe results, and adjust strategies. Claude Code, as a programming Agent, implements complex reasoning chains internally: analyze project structure → formulate modification plan → select appropriate tools (read files, write files, execute commands, etc.) → verify modification results → handle exceptions.
What Anthropic calls "Harness Engineer" (engineering capability) refers to optimizing Opus model's performance on engineering tasks specifically through RLHF (Reinforcement Learning from Human Feedback). This deep coupling means the Agent's prompt templates, tool invocation strategies, and error recovery mechanisms are all designed around Opus's response characteristics. Switching to other models causes these carefully tuned strategies to fail, preventing the agent's reasoning chains and tool invocation strategies from performing optimally.
Claude Code's unique advantage also manifests in its automatic generation of project management files:
- agent.md: Agent behavior specifications
- claude.md: Project context description
- skills folder: Accumulated skill templates
These files constitute a "project memory system." agent.md defines the agent's behavioral norms for the current project, such as code style preferences, lists of files that must not be modified, testing requirements, etc. claude.md records the project's tech stack, directory structure, core business logic, and other contextual information. The skills folder accumulates operation templates repeatedly used in the current project, such as database migration script patterns, standard API endpoint structures, etc. This mechanism essentially solves the "stateless" problem of large language models—each conversation starts from scratch, but through these persistent files, the Agent can quickly restore deep project understanding at each startup, achieving cross-session knowledge accumulation and capability evolution.
Recommended Model Combinations and Cost Analysis
Recommended Combinations for Different Scenarios
| Scenario | Recommended Combination | Notes |
|---|---|---|
| Commercial-grade complex projects | Claude Code + Opus 4.7 | Irreplaceable, highest first-run success rate |
| Commercial-grade projects (alternative) | Codex + GPT 5.5 | Also capable of handling complex projects |
| General/small projects | OpenCode + GLM 5.1 | Best value with domestic models |
| Lightweight experimentation | OpenCode + DeepSeek V4 Pro | Worth trying, results vary by project |
AI Coding vs Traditional Development Cost Comparison

Traditional approach to completing the same payment feature development:
- Requires 1 senior Go engineer + 1 senior frontend engineer
- Estimated development cycle: at least 3 days
- Labor cost (including benefits): conservatively 3,000-5,000 RMB
- Not counting communication costs, integration time, or time spent reading documentation with support
AI Coding approach:
- $60 (approximately 400+ RMB)
- Completed in 4 hours
- First-run success, high code quality
The gap speaks for itself. Even on a monthly basis, consuming $1,000 in tokens is far less than a senior engineer's monthly salary.
Tips for AI Coding Beginners
-
Don't be stingy with token consumption: Just as code volume used to measure programmer capability, many companies now ask AI Coding candidates how many tokens they've consumed. Without actual consumption, watching tutorials is useless.
-
Use top-tier models: The lower-end the model, the more likely it is to lead you astray and waste time. Use the best available, especially for commercial projects.
-
Develop engineering thinking: The core of AI Coding isn't writing code—it's writing good requirements. You need architectural design thinking, the ability to clearly describe technical solutions, constraints, and quality requirements. This "engineering thinking" differs from traditional coding ability—it's closer to the role of a system architect or technical product manager. You need to understand overall system design, inter-module dependencies, non-functional requirements (performance, security, maintainability), and translate this information into structured instructions that AI can accurately execute.
-
Make good use of manual confirmation mode: While fully automatic mode is tempting, manual confirmation at critical points prevents the AI from going off track, especially when dealing with sensitive modules like databases and payments.
-
Get your company to cover the costs: If you don't want to bear the cost personally, you can absolutely request an AI Coding budget from your company. A few thousand RMB per month in token fees yields multiple times the efficiency improvement.
Conclusion
AI Coding has evolved from "usable" to "genuinely good." Through CCSwitch for unified model management, the golden combination of Claude Code + Opus 4.7, and structured requirements descriptions, even complex commercial-grade payment feature development can be completed with high quality in just a few hours.
The key isn't whether you can write code—it's whether you can harness AI with engineering thinking. That's the most valuable skill of this era.
Key Takeaways
Related articles

Anjney Midha: The Rise from Singapore to Helm of a16z's AI Investment Empire
Deep dive into Anjney Midha, the key figure behind a16z's AMP fund, covering investments in Anthropic, Mistral, and Black Forest Labs, and his Outputmaxxing philosophy.

Pi: A Lightweight AI Coding Agent Framework — Setup & Hands-On Guide
A deep dive into Pi, a minimalist AI coding Agent framework covering multi-model support, extensions, skill loading, and hands-on custom extension building with model mixing strategies.

Why the Mayor of Los Angeles Has No Real Power: A City Designed to Be the Anti-New York
Why does LA's mayor seem powerless during crises like wildfires? It's not about competence — it's a century-old system designed to prevent corruption by radically decentralizing power.