Creating a webhook

Learn how to create webhooks from the Dashboard.

You can create a webhook to send notifications in five easy steps.

Step 1: Open your firewall to trusted Digital River IP addresses

To receive webhook notifications from Digital River, you'll need to open your firewall to all the IP addresses listed in the Digital River safelist.

Step 2: Create a webhook endpoint

You can send webhook data as JSON in the POST request body. The POST request body contains the complete event details, and you can use it after parsing the JSON into an Event object.

Step 3: Create webhooks

When creating webhooks, you need to add endpoints from the Dashboard:

  1. From the Webhooks page, click Create Webhook.

  2. Toggle Disabled to Enabled.

  3. If required, select the API version you want to associate with events from the API Version dropdown list. By default, the confidential key version is selected.

  4. Choose the Authentication method and complete the associated fields. Your options are as follows:

    • None

    • Basic

    • OAuth

  5. Enter the URL for the endpoint in the Endpoint URL field.

  6. Select the check box next to each event you want to associate with the endpoint or select the Events Selected check box to select all events. At least one event type must be selected.

  7. Scroll down and click Save.

Step 4: Respond to webhook events

Your endpoint must return a 2xx HTTP status code to acknowledge the receipt of an event. If the endpoint fails to acknowledge events over several days, your endpoint will be disabled.

If Digital River receives any response codes outside this range, it indicates that you did not receive the event. For example, Digital River treats a URL redirection as a failure.

Once you have verified your endpoint can receive, acknowledge, and handle events correctly:

  1. Toggle from Test to Production in the Dashboard.

  2. Go through the same configuration steps again to configure an endpoint for your production integration.

If you're using the same endpoint for both test and production modes, the signing token is unique to each data mode.

Step 5: Check signatures

To verify signatures, you need to retrieve your endpoint's token from the Dashboard's Webhook settings. To see an endpoint's token:

  1. From the Webhooks page on the Dashboard, click the Reveal secret token associated with the endpoint you want to verify.

  2. Provide your credentials and click Authenticate. The Token field under Signing secret will display the token.

See Digital River signature for more information.