Webhook Setup
Learn how to set up and configure webhooks for your Notch Pay account
Webhook Setup
Real-time Event Notifications
Learn how to set up webhooks to receive instant notifications when events occur in your Notch Pay account, enabling you to automate your business processes and provide a better customer experience.
What are Webhooks?
Webhooks are HTTP callbacks that notify your application when events happen in your Notch Pay account. Instead of your application constantly polling the Notch Pay API for updates, webhooks push events to your application as they happen.
Think of webhooks as a “phone call” from Notch Pay to your application, rather than your application repeatedly “calling” Notch Pay to check for updates.
Why Use Webhooks?
- Real-time updates - Get notified immediately when events occur
- Reduced API calls - No need to constantly poll for updates
- Automation - Trigger workflows automatically
- Better user experience - Update your UI in real-time
Implementation Overview
Create a Webhook Endpoint
Set up an endpoint on your server that can receive HTTP POST requests from Notch Pay.
Register Your Endpoint
Add your webhook URL to your Notch Pay account and select which events you want to receive.
Implement Signature Verification
Verify that incoming webhook requests are actually from Notch Pay by checking the signature.
Process Webhook Events
Handle the different types of events and update your systems accordingly.
Test Your Implementation
Use the Notch Pay dashboard to send test events to your webhook endpoint.
Common Use Cases
Order Management
Automatically update order status when a payment is completed, failed, or refunded. Trigger fulfillment processes and notify customers about their order status.
Customer Communications
Send confirmation emails, SMS notifications, or in-app messages to customers when their payments are processed or transfers are completed.
Inventory Management
Update your inventory systems automatically when products are purchased. Trigger reordering processes when stock levels fall below thresholds.
Analytics & Reporting
Track payment success rates, monitor failed payments, and analyze customer payment patterns. Log events for audit trails and compliance reporting.
Setting Up Your Webhook Endpoint
Your webhook endpoint should:
- Accept HTTP POST requests
- Parse JSON request bodies
- Respond with a 2xx status code (preferably 200 OK)
- Process the webhook data asynchronously if needed
Registering Your Webhook
- Log in to your Notch Pay Business suite
- Navigate to Settings > Webhooks
- Click “Add Endpoint”
- Enter your webhook URL (e.g.,
https://example.com/webhooks/notchpay
) - Select the events you want to receive
- Click “Save” to create the webhook
- Log in to your Notch Pay Business suite
- Navigate to Settings > Webhooks
- Click “Add Endpoint”
- Enter your webhook URL (e.g.,
https://example.com/webhooks/notchpay
) - Select the events you want to receive
- Click “Save” to create the webhook
For more details, see the Webhooks API Reference.
Key Webhook Events
Securing Your Webhooks
Testing Your Implementation
Test in the Dashboard
Use the “Test” button in your Notch Pay dashboard to send test events to your webhook endpoint.
Test Locally with Tunneling
For local development, use tools like ngrok to expose your local server to the internet:
Use the generated URL (e.g., https://abc123.ngrok.io/webhooks/notchpay
) as your webhook endpoint.
Check Webhook Logs
Monitor your webhook delivery logs in the Notch Pay dashboard to ensure events are being delivered successfully.
Best Practices
Respond Quickly
Return a 200 response as soon as possible, then process the webhook asynchronously to avoid timeouts.
Verify Signatures
Always verify webhook signatures to ensure they come from Notch Pay.
Handle Duplicates
Design your webhook handler to be idempotent, as the same event might be delivered multiple times.
Implement Logging
Log all webhook events for debugging and auditing purposes.
Handle Retries
Be prepared for Notch Pay to retry failed webhook deliveries with exponential backoff.
Monitor Performance
Monitor your webhook endpoint’s performance to ensure it can handle the volume of events.
Next Steps
Webhooks API Reference
Explore the complete Webhooks API documentation
Webhook Verification
Learn more about webhook signature verification
API Reference
Explore the complete API documentation
Secure Your Webhooks
Now that you’ve set up your webhook endpoint, it’s important to secure it by verifying webhook signatures. This ensures that webhook events are actually coming from Notch Pay and not from a malicious source.
API Reference
Explore the complete Webhooks API reference documentation for detailed information about endpoints and parameters.
View API Reference
SDK Integration
Our SDKs provide built-in support for webhook signature verification and event handling.
Explore SDKs
Troubleshooting
Having issues with your webhooks? Check our troubleshooting guide for common problems and solutions.
Troubleshooting Guide