How to enable webhook in sandbox?

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
  1. // Your secret key or token
  2. $secretKey = 'your_secret_key';
  3. // The payload and signature received from the webhook
  4. $payload = json_encode($payload); // Replace with the actual way you retrieve the payload
  5. $receivedSignature = $_SERVER['HTTP_SIGNATURE']; // Replace 'HTTP_SIGNATURE' with the actual header key signature

  6. // Calculate the expected signature
  7. $expectedSignature = hash_hmac('sha256', $payload, $secretKey);

  8. // Compare the received and expected signatures
  9. if (hash_equals($expectedSignature, $receivedSignature)) {
  10.     // Signature is valid, proceed to process the webhook data
  11.     // ...
  12. } else {
  13.     // Signature is invalid
  14.     // Handle the error
  15. }

For quick reference and immediate information about our API, please, visit this link https://onlinecheckwriter.com/online-check-writer-api/ 

 
 

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 export the Positive Pay file?

      Step 1: Log in to Online Check Writer and go to Bank Accounts. Step 2: Click Positive Pay in the top right corner of the page. Step 3: Click on the REQUEST NOW button. Step 4: The customer support team will verify and enable the feature. Step 5: ...
    • How to integrate QuickBooks Desktop with Online Check Writer?

      Login to Online Check Writer and select Apps. Click QuickBooks Desktop. Then, click Download File to download the integration file. Enter the file name and password, confirm the password, and click Download. After downloading the file, open the ...
    • How to do transactions quickly using Online Check Writer?

      Online Check Writer enhances customer experience by offering diverse payment methods for quick and smooth transactions. The platform provides ACH, Pay by Credit Card, Payroll by Credit Card, Wire Transfer, Wallet to Wallet Transfer, QR Code Payment, ...