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 ...
    • 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 can I enable pushback to QuickBooks?

      To enable pushback to QuickBooks, follow these steps: Go to Applications > QuickBooks Online Click the gear icon for settings Select "Enable pushback" Optionally, import categories Click Update
    • What methods are available to receive payments?

      Users can send payment request links via email or text. They can also enable credit card payments, print received checks for deposit or use ACH debits to pull funds from customer accounts.
    • How does the ACH payment process work?

      The company must add and verify its bank account, enable ACH, and select the "Pay from US bank account" and "Pay as ACH" options. Payments can be sent to existing employees or new ones. Funds are collected from the company's account and deposited ...