waffo-integrate is Waffo’s official AI integration Skill. It helps developers automatically complete SDK integration through an interactive wizard. It supports AI coding tools such as Claude Code and Cursor.Documentation Index
Fetch the complete documentation index at: https://waffo.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Integration roadmap
Answer business questions
Select the capabilities you need, such as payment, refund, subscription, Webhook, merchant configuration lookup, and payment method lookup.
Review and generate code
The AI tool previews the code, then generates SDK initialization, services, Webhook handlers, and tests after confirmation.
Run verification
The AI tool runs integration tests covering payment, refund, subscription, and Webhook flows.
Why use waffo-integrate
| Metric | Using the Skill | Manual integration | Improvement |
|---|---|---|---|
| Integration pass rate | 100% | 75% | +25% |
| Average time | 128s | 192s | -33% |
| Token usage | 58.8k | 66.3k | -11% |
Installation
Integration flow
Trigger the Skill
Enter a trigger phrase in your AI assistant:
集成 Waffo 支付, integrate waffo, 接入waffo, waffo sdk, or waffo payment.Language detection
The Skill automatically detects the project language:
package.json → Node.js, pom.xml / build.gradle → Java, go.mod → Go.Feature selection
Interactively select the features you need (prompted one by one): payments, refunds, subscriptions, Webhook, merchant configuration lookup, payment method lookup. Smart recommendations: if you select payments, it will suggest adding refunds; if you select subscriptions, it will suggest adding Webhook.
Framework selection (Webhook only)
| Language | Recommended framework | Other options |
|---|---|---|
| Node.js | Express | NestJS, Fastify |
| Java | Spring Boot | — |
| Go | Gin | Echo, Fiber, Chi |
Code preview & generation
The Skill first displays the complete code for review, then generates it after confirmation: SDK initialization, payment/refund/subscription services, Webhook handling, test files, and
.env.example.13 built-in API rules
The Skill’s built-in rules automatically prevent common mistakes:| # | Rule | Prevents |
|---|---|---|
| 1 | Request ID max length is 32 characters | Values longer than the Waffo idempotency key limit |
| 2 | Subscriptions use currency, not orderCurrency | Field name confusion |
| 3 | Subscriptions use amount, not orderAmount | Field name confusion |
| 4 | Required-field checks for each operation | Missing payMethodType, goodsInfo, etc. |
| 5 | periodType is only DAILY/WEEKLY/MONTHLY | Invalid enums YEARLY, MONTH |
| 6 | periodInterval is String, not Number | Type errors |
| 7 | Subscriptions must include payMethodType | SDK error A0003 |
| 8 | productName is only ONE_TIME_PAYMENT / SUBSCRIPTION | Invalid product type |
| 9 | Use isSuccess() to check responses | Missing error handling |
| 10 | Webhook must verify the signature + sign the response | Security vulnerability |
| 11 | Java uses WaffoConfig.builder() | SDK initialization failure |
| 12 | Timestamps are auto-injected by the SDK | Incorrect manual timestamp format |
| 13 | merchantId is auto-injected by the SDK | Duplicate setting |
Generated code features
- Error handling: distinguishes between
WaffoUnknownStatusError(may have succeeded) andWaffoError(client error) - Security: Webhook signature verification + response signing, credential management via environment variables
- Best practices: idempotent request IDs, service-layer separation, register Webhook before parsing JSON
- Testing: sandbox integration test stubs, test card numbers