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.
Response Codes
Waffo API response format:codeof"0"indicates success- On failure,
codeis an error code string (e.g.,"A0003","E0001") - The response field is named
msg(notmessage)
Error Code Categories
| Prefix | Category | Description |
|---|---|---|
| 0 | Success | — |
| A | Merchant error | Invalid parameters, insufficient permissions, etc. |
| B | User error | Insufficient balance, payment timeout, etc. |
| C | System error | Channel rejection, system errors, etc. |
| D | Risk Control rejection | Transaction blocked by Risk Control |
| E | Unknown error | Critical: payment may have succeeded |
Handling E0001 Unknown Status
Principles
- Do not assume failure: a network timeout does not mean the payment failed
- Do not automatically close the order: the payment may have already completed on the channel side
- Do not create a new order: use the original
paymentRequestIdto query
Error Types in the SDK
| Language | Unknown status error | Client error |
|---|---|---|
| Node.js | WaffoUnknownStatusError | WaffoError |
| Java | WaffoUnknownStatusException | WaffoException |
| Go | *core.WaffoUnknownStatusError | *core.WaffoError |
The SDK has only two error types.
WaffoUnknownStatusError/Exception means the payment may have succeeded, while WaffoError/Exception indicates a client-side error (configuration, signature, etc.).SDK Error Codes
| Error code | Type | Description |
|---|---|---|
| S0001 | UnknownStatus | Network error (timeout, connection failure) |
| E0001 | UnknownStatus | Server returned unknown status |
| S0002 | Error | Invalid public key |
| S0003 | Error | Signature failed |
| S0004 | Error | Response signature verification failed |
| S0005 | Error | Request serialization failed |
| S0007 | Error | Invalid private key |