Create a handler
Your handler should preserve the raw request body, verify the signature, reject invalid deliveries, deduplicate by event ID, and return a successful response quickly.Node.js
Choose events
- Use
collateral.depositedto refresh wallet collateral. - Use
guarantee.settledto reconcile payment completion. - Use
withdrawal.requestedto show a pending withdrawal. - Use
withdrawal.finalizedto mark funds withdrawn.
Test before production
- Send a valid example payload from the event page.
- Send the same event ID twice and confirm the second delivery has no effect.
- Send events out of order and confirm your state remains correct.
- Send a modified body with an invalid signature and confirm it is rejected.
- Make the worker fail temporarily and confirm the event can be retried safely.