HomeGuidesAPI ReferenceChangelog
Log In
Guides

Webhook Events

Webhooks allow you to subscribe to certain events that happen in Revolv3. When one of these events are triggered we’ll send a HTTP POST payload to the webhook’s configured URL.

Webhooks are configured on a per-merchant basis and we will send you events for every merchant registered in Revolv3.

Events

The available events you will receive are:

Event TypePayload Example
SubscriptionCreated{
"EventDateTime": "2023-08-22T21:02:01.9510921Z",
"EventType": "SubscriptionCreated",
"MerchantId": 2,
"RecordId": 1,
"Entropy": "7f64ba26-74db-4cab-8e9c-76a98ba43351"
}
SubscriptionFailed{
"EventDateTime": "2023-08-22T21:02:01.9510921Z",
"EventType": "SubscriptionFailed",
"MerchantId": 2,
"RecordId": 1,
"Entropy": "7f64ba26-74db-4cab-8e9c-76a98ba43351"
}
ACHInvoiceStatusChanged{
"EventDateTime": "2023-08-22T21:02:01.9510921Z",
"EventType": "ACHInvoiceStatusChanged",
"MerchantId": 2,
"RecordId": 137,
"Entropy": "7f64ba26-74db-4cab-8e9c-76a98ba43351"
}
InvoiceCreated{
"EventDateTime": "2023-08-22T21:01:01.9510921Z",
"EventType": "InvoiceCreated",
"MerchantId": 2,
"RecordId": 137,
"Entropy": "7f64ba26-74db-4cab-8e9c-76a98ba43351"
}
InvoiceStatusChanged{
"EventDateTime": "2023-08-22T21:02:01.9510921Z",
"EventType": "InvoiceStatusChanged",
"MerchantId": 2,
"RecordId": 137,
"Entropy": "7f64ba26-74db-4cab-8e9c-76a98ba43351"
}
WebhookTest{
"EventDateTime": "2023-08-31T13:30:22.8938167Z",
"EventType": "WebhookTest",
"MerchantId": 2147483647,
"RecordId": 2147483647,
"Entropy": "d1153029-c1a9-4497-b1e8-10111751fece"
}

Each Event will consist of:

EventDateTimeThe date and time that event occurred (UTC time)
EventTypeThe type of event of that occurred (see the table above)
MerchantIdThe ID of the merchant that the event happened in
RecordIdThe ID of the resource that has changed (Invoice, Subscribtion, etc…)
EntropyA random string to make the payload more cryptographically secure

The x-revolv3-signature header

A hashed signature of the payload is passed along in the headers of each request as x-revolv3-signature. This signature is used to be sure all requests are sent from revolv3 application.

We are using HMACSHA256 algorithm to generate the signature key.

Example of how to check on C#

public static bool IsValidWebhookEventSignature(  
        string requestBody,  
        string signatureHeader,  
        string signatureKey,  
        string url)  
{  
	if (string.IsNullOrEmpty(signatureKey))  
		throw new ArgumentNullException(nameof (signatureKey));  
	if (string.IsNullOrEmpty(url))  
		throw new ArgumentNullException(nameof (url));  
	byte[] bytes = Encoding.UTF8.GetBytes($"{url}${requestBody}");  
	using var hmacshA256 = new HMACSHA256(Encoding.UTF8.GetBytes(signatureKey));  
	return Convert.ToBase64String(hmacshA256.ComputeHash(bytes)).Equals(signatureHeader);  
}

Creating a webhook
To create a webhook for your merchant you have to go to Webhooks page and create a new webhook.

You have to specify:

The url for us to deliver to.

You have to copy your Webhook Key and prepare your backend to receive the webhooks.

If your app is ready to receive webhooks, click on the Test Connection button. In case we receive a response with code 200 the Save button will be enabled. After you save the configuration everything is ready to receive information