Powered by Coinflow
Payments ยท Documentation
Operational

๐Ÿช Webhook Implementation

Webhooks Best Practices

Respond to webhooks quickly by queuing payloads for background processing. Avoid handling them inline to prevent timeouts and retries.

Background vs. Inline Processing

  • Inline: Slowerโ€”handles tasks immediately.
  • Background: Fasterโ€”queues tasks, allowing immediate webhook response.

Handling Webhooks

  1. Use a queue for long-running tasks to avoid timeouts and retries.
  2. Always acknowledge the webhook immediately upon receipt.

Webhooks may be sent more than onceโ€”add deduplication logic to prevent duplicate events.

Security Tips

โœ… Keep your API key secure โœ… Verify webhook authorization โœ… Validate message format

โ„น๏ธ Coinflow will retry sending webhook events until:

  • Your server returns a 200 OK
  • Or 36 hours passes
  • Note: Your server must respond within 5 seconds or the request will timeout and retry.