How to enable webhook in sandbox?
To enable webhook, Go to More >> Developer Panel
Under the Webhook settings window, provide the necessary details.
Webhook Signature Validation
To secure our webhook events, we are signing the HTTP request body with an HMAC using the secret as the signing key. Every webhook created has a secret used to sign requests with a signature header allowing listeners to validate requests. All webhook request messages are sent with a signature header key which should be used to validate the message payload. The algorithm calculates the HMAC of the HTTP request body in bytes using the webhook secret as the key (via SHA-256). If the calculated HMAC matches the value in the signature, then the message should be considered valid if the HMAC validation fails, the message should be discarded.
Code Snippet - PHP Example
- // Your secret key or token
- $secretKey = 'your_secret_key';
- // The payload and signature received from the webhook
- $payload = json_encode($payload); // Replace with the actual way you retrieve the payload
- $receivedSignature = $_SERVER['HTTP_SIGNATURE']; // Replace 'HTTP_SIGNATURE' with the actual header key signature
- // Calculate the expected signature
- $expectedSignature = hash_hmac('sha256', $payload, $secretKey);
- // Compare the received and expected signatures
- if (hash_equals($expectedSignature, $receivedSignature)) {
- // Signature is valid, proceed to process the webhook data
- // ...
- } else {
- // Signature is invalid
- // Handle the error
- }
For requests or more detailed information about our API, please, send your inquiry to us at Support@onlinecheckwriter.com. Our development team will be in contact.
Related Articles
How to enable webhook in production?
To enable webhook, Go to More >> Developer Panel (https://live.onlinecheckwriter.com/manage/developer/index) Under the Webhook settings window, provide the necessary details. 1. Webhook URL: The URL to receive the webhook. 2. Secret key: Set any key ...
How to Subscribe to Webhooks and Get Status Updates for Your Mailed Checks via OCW API
Guide: How to Subscribe to Webhooks and Get Status Updates for Your Mailed Checks Welcome! This comprehensive guide will walk you through the complete workflow of setting up webhooks to automatically receive real-time status updates when your mailed ...
Document Mailing Tracking : Webhook
Events check.mailing.tracking document.mailing.tracking Sample Payload : { "event": { "type": "check.mailing.tracking", "data": { "id": "RmA345KVr0egdoL", "mode": "local", "carrier": "USPS", "mailType": 1, "trackingUrl": "", "trackingCode": ...
Getting Started : Sandbox
Go to this URL and sign up: https://sandbox.onlinecheckwriter.com/register Watch this video to learn how to get all the information: https://www.youtube.com/watch?v=53pemBjEexw Please verify your account. If you couldn't verify your account because ...
How to Mail Documents (PDF) via OCW API
Guide: How to Mail Documents (PDF) Welcome! This comprehensive guide will walk you through mailing PDF documents physically to any destination address. With a single API request, you can upload your document, specify sender and recipient details, and ...