Step 9: Set up webhooks
Learn how to set up webhooks for fulfillment and for VAT invoicing.
Set up webhooks for fulfillment using Postman
Digital River uses webhooks to notify the app when events occur. As part of the fulfillment process, the app looks for two events: order.accepted
and order.complete
.
The order.accepted
event occurs whenever a Digital River order is submitted, and the payment is Authorized (funds are not captured yet).
The order.complete
event occurs whenever an order is both fulfilled and captured (funds are captured).
Follow the steps below to register webhook URLs for your Digital River site so that Digital River can notify the app when the order.accepted
and order.complete
events occur.
Prerequisites
You will need the following information before you set up the webhook URLs.
Username of Fulfillment Integration User.
Password of Fulfillment Integration User.
Client Id of Connected App DigitalRiver B2B Fulfillment created in step 8a.
Client Secret of Connected App DigitalRiver B2B Fulfillment created in step 8a.
Security Token of Fulfillment Integration User.
Register the Webhook URL for the order.accepted
event
order.accepted
eventOpen a REST client such as Postman.
Set the HTTP method to POST.
Set the URL as
https://api.digitalriver.com/webhooks
.Set the HTTP body as shown in the following example:
Note: The URL for the tokenEndpoint
is “https://test.salesforce.com/services/oauth2/token” for the sandbox and “https://login.salesforce.com/services/oauth2/token” for production.
Register the webhook URL for the order.complete
event
order.complete
eventOpen Postman.
Set the HTTP method to POST.
Set the URL as https://api.digitalriver.com/webhooks.
Set the HTTP body as shown in the following example:
A successful request returns a 200 OK response. Once configured, you can see these webhooks in the Digital River Dashboard.
Set up webhooks for VAT invoicing
Support for retrieving VAT Invoices is now available within this app.
Sample Webhook registration for the event order.invoice.created
.
Note: The URL for the tokenEndpoint
is
https://test.salesforce.com/services/oauth2/token
for the sandbox and
https://login.salesforce.com/services/oauth2/token
for production.
For the address
, the MyDomain URL should be
(https://example-domain.my.salesforce.com
), not the Lightning Force URL (https://example-domain.lightning.force.com
).
Last updated