TutorialFeb 10, 2026·15 min read

Setting Up Webhook Callbacks for Crypto Payments: A Developer Guide

Learn how to implement webhook callbacks for real-time payment notifications with code examples and security best practices.

Webhooks are the backbone of any payment integration. When a customer completes a crypto payment, your server needs to know immediately so you can fulfill the order, activate the subscription, or update the account balance.

How PayerScan Webhooks Work

When a payment is confirmed on-chain, PayerScan sends a POST request to your configured callback URL with the transaction details including: invoice ID, amount received, token, network, transaction hash, and status.

Setting Up Your Webhook Endpoint

Create an HTTP endpoint that accepts POST requests. The endpoint should: (1) validate the request signature, (2) parse the payment data, (3) verify the amount matches your invoice, and (4) process the fulfillment logic.

Security Best Practices

Always verify webhook signatures — PayerScan signs every webhook with your API secret. Never trust webhook data without verification. Use HTTPS for your webhook endpoint. Implement idempotency to handle duplicate webhook deliveries safely.

Handling Failures

PayerScan automatically retries failed webhook deliveries up to 5 times with exponential backoff. If all retries fail, the payment is still recorded in your dashboard — check the dashboard as a fallback.

Testing Webhooks

Use PayerScan's test mode to simulate payments without spending real crypto. This lets you verify your webhook handler before going live. You can also use tools like ngrok to expose your local development server for webhook testing.

Last updated: Feb 10, 2026

Ready to accept crypto payments?

Start your 7-day free trial. No credit card required.

Get Started Free