Payment Capabilities
Payment capabilities are more than adding a pay button
From the current codebase, We0.ai can route payment capability through the plugin entry into the actual generation path. After a user enables a plugin in chat, the frontend passes both the visible instruction and the hidden agentPrompt to the backend. The backend injects that capability into the system prompt, so the generated result is closer to a connected path covering checkout, payment windows, callback verification, result lookup, and plan wiring. This means payment no longer needs to be treated as a late-stage patch and can enter formal delivery and monetization validation much earlier.
Key nodes already confirmed in code
This page is grounded in real implementation. The repository already contains concrete code for plugin entry, message passthrough, payment APIs, payment popups, and callback handling.
Plugin entry
Payment capability starts from the plugin selector in chat instead of being marketed as an isolated service.
Two-layer prompt passthrough
The frontend appends visible plugin text to the message and also sends package and agentPrompt in hidden XML.
Payment API path
The project already includes key routes such as /api/payment/checkout, /api/payment/webhook, and /api/payment/result.
Payment window feedback
The current implementation already covers payment page launch, same-origin result posting, success or cancel handling, and WeChat payment lookup.
How the flow runs from plugin entry to generated payment code
The core idea is not a marketing sentence. It is an explicit capability path wired into message building, system prompt injection, and runtime payment code.
User enables a plugin
After a plugin is selected in plugin-select-button, inline or dialog parameters are stored on the frontend until the message is submitted.
Message carries capability info
On submit, plugin text is appended to the message body while package and agent_prompt are attached in enabled-plugins XML.
Backend injects payment ability
The backend parses enabled-plugins from the last user message, reads the forwarded agent_prompt, and merges it into the system prompt.
A connected payment path is generated
The result can then continue around price config, checkout creation, webhook verification, payment result lookup, and frontend payment window interactions.
Why generated payment flow is different from simply saying "supports payments"
A usable payment capability is not about button styling. It depends on whether the code path before and after payment is actually connected.
| Dimension | Generated payment flow | Isolated payment description |
|---|---|---|
| Enablement | Explicitly enabled from the plugin entry and carried through the generation flow | Mentioned vaguely in a prompt and easy to lose at implementation time |
| Code landing points | Can map to checkout, webhook, result, and payment window nodes | Often stops at a button or a conceptual sentence |
| Runtime loop | Covers payment launch, result return, order lookup, and callback handling | Leaves major gaps between frontend and backend |
| Best fit | Better for production projects moving into monetization | Only suitable for early demos |
What it solves
- Turns payment needs into a traceable generation entry instead of a vague requirement.
- Reduces the gap where the frontend has a button but the backend has no real flow.
- Makes checkout, webhook, result lookup, and payment page interaction easier to land together.
- Fits projects that need auth, plans, credits, or other monetization loops.
- Helps projects validate pricing and conversion paths much earlier.
What it improves for a project
Many website projects only validate pages and content in the early stage. By the time they need monetization, they discover that payments, plans, orders, and result feedback require another round of engineering work. The advantage of generated payment flow is that these key parts enter the structure earlier, so the project can move more naturally from being presentable to being sellable.
Earlier monetization validation
When payment enters the generation scope earlier, teams can validate subscriptions, purchases, and recharge flows much sooner.
Less last-minute rework before launch
Once payment is part of the same generated path, teams do not need to wait until the final launch stage to patch checkout, callbacks, and result lookup.
Better fit with plans, credits, and account logic
Payment can be designed more naturally together with pricing plans, credit usage, account entitlements, and monetization structure instead of forcing structural changes after pages are already settled.
A more complete production delivery
Compared with building presentation pages only, generated payment flow helps push a project closer to something that can transact, convert, and keep operating.
Growth and conversion close the loop earlier
When payment is included earlier, the path from traffic to sign-up to purchase is easier to design as one conversion loop rather than separate concerns.
Use cases
- Product sites that need subscriptions, one-time purchases, or credit recharge
- SaaS sites and MVPs that want payment inside the AI generation scope
- Projects needing Stripe, Creem, or WeChat Pay integration guidance
- Production delivery scenarios that should not stop at a verbal "supports payments" claim
- Product teams that want to validate pricing models, membership offers, and conversion loops earlier