Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
使用幂等键防止重复扣款并确保支付安全。
paymentRequestId
subscriptionRequest
// 1. 生成不超过 32 字符的唯一幂等键 const paymentRequestId = generateUniqueRequestId(); // 2. Persist (before sending the request!) await db.order.create({ paymentRequestId, status: 'PENDING' }); // 3. Send the request try { const response = await waffo.order().create({ paymentRequestId, ... }); } catch (e) { if (e instanceof WaffoUnknownStatusException) { // 4. Unknown status: inquire, do not retry create const inquiry = await waffo.order().inquiry({ paymentRequestId }); } }