What problem does it solve?
Payment callbacks and webhooks (WeChat Pay, Alipay, Stripe, PayPal) are exposed to the public internet, making them targets for forged notifications, replayed messages, and amount tampering. This Skill provides a security checklist and code patterns to audit callback handlers before these vulnerabilities reach production.
Core Features & Use Cases
- Signature Verification Enforcement: Ensures callbacks verify the platform's public key signature before decryption or processing, with support for certificate rotation by serial number.
- Replay Attack Prevention: Covers three-layer defense using timestamp windows, transaction_id idempotency, and order state machine checks.
- Business Consistency Validation: Enforces strict matching of callback amounts, out_trade_no, appid, and mchid against local order records, and unifies validation logic between callback and reconciliation paths.
- Use Case: Before shipping a WeChat Pay V3 integration, run this checklist against your callback controller to confirm signature verification happens before decryption, duplicate notifications return success idempotently, and no placeholder TODO implementations return fake data.
Quick Start
Review my payment callback handler for WeChat Pay and check it against the signature verification, replay prevention, and amount consistency rules.