Creating a webhook
Learn how to create webhooks from Global Commerce.
Last updated
Learn how to create webhooks from Global Commerce.
Last updated
Creating a webhook allows your system to receive real-time notifications from Digital River, enabling you to automate and enhance your processes. Whether you're tracking subscription updates, inventory statuses, or any other events, setting up a webhook is a straightforward process that involves opening your firewall to Digital River IPs, creating the webhook in your Digital River project, and configuring your system to respond to the events. Follow these simple steps to get started.
You can create a webhook to send notifications in three easy steps.
To receive webhook notifications from Digital River, you must open your firewalls to all trusted Digital River IP addresses listed in the Commerce API safelist. See the Commerce API Safelist section for trusted Digital River IP addresses.
When creating webhooks, you need to add endpoints from Global Commerce:
Sign in to Global Commerce.
Select Administration, and then click Webhook Service. The Webhook Service page appears.
From the Webhook Service page, click Create Webhook. The Create Webhook page appears.
Enter the URL for the endpoint in the Endpoint URL field. The endpoint URL will receive the webhook payload. The URL must start with either https://
or http://
.
Choose either HTTP or OAUTH as the Transport Type.
HTTP: Provide the following information to create HTTP-configured webhooks:
Username: Type your username.
Password: Type your password.
OAUTH: To create OAuth2-configured webhooks, provide the following information:
Grant type: Choose either Client credentials or Password.
Token endpoint URL: Type the URL for the token endpoint starting with the HTTP://
or HTTPS://
.
Username: Type your username. Username and Password only appear if you choose Password as the Grant type.
Password: Type your password.
Client ID: Provide the API key for your account.
Client secret: Provide the confidential key for your account.
Optional. Select Enabled for Status. Note: If you do not select Enabled, no payment will be sent when an event occurs. Also, the system will ask you if you want to enable the webhook when you click Create.
Select the checkbox next to each event you want to associate with the endpoint, or select the checkbox next to Event to select all events. You must select at least one event type.
Scroll down and click Create. By following these steps, you will successfully subscribe to selected event types, enabling your systems to receive notifications and respond to changes promptly.
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.
You will not receive the event if Digital River receives response codes outside this range. For example, Digital River treats a URL redirection as a failure.