You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en-us/cloud/webhooks/webhook-notifications.md
+25-29Lines changed: 25 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,26 +17,26 @@ Once you set up a webhook, whenever a target event occurs, Roblox sends a reques
17
17
18
18
## Supported triggers
19
19
20
-
Roblox currently supports the following event triggers for notifications:
20
+
Roblox currently supports the following event triggers.
21
21
22
-
### Subscriptions
22
+
### Subscription
23
23
24
-
-**Subscription Cancelled**— When a user cancels a [subscription](../../production/monetization/subscriptions.md), a message is sent containing the subscription and subscriber, as well as the reason given for the cancellation.
25
-
-**Subscription Purchased**— When a user purchases a subscription, a message is sent containing the subscription and subscriber.
26
-
-**Subscription Refunded**— When a user receives a refund for their subscription, a message is sent containing the subscription and subscriber.
27
-
-**Subscription Renewed**— When a user renews a subscription, a message is sent containing the subscription and subscriber.
28
-
-**Subscription Resubscribed**— When a user resubscribes to a subscription, a message is sent containing the subscription and subscriber.
24
+
-**Subscription Resubscribed**- When a user resubscribes to a subscription, a message is sent containing the subscription and subscriber.
25
+
-**Subscription Renewed**- When a user renews a subscription, a message is sent containing the subscription and subscriber.
26
+
-**Subscription Refunded**- When a user receives a refund for their subscription, a message is sent containing the subscription and subscriber.
27
+
-**Subscription Purchased**- When a user purchases a subscription, a message is sent containing the subscription and subscriber.
28
+
-**Subscription Cancelled**- When a user cancels a [subscription](../../production/monetization/subscriptions.md), a message is sent containing the subscription and subscriber, as well as the reason given for the cancellation.
29
29
30
-
For more information on subscription events and their fields, see the [Cloud API Subscription](../../cloud/reference/Subscription/) reference.
30
+
For more information on subscription events and their fields, see the [Subscription](/cloud/reference/Subscription/) reference.
31
31
32
32
### Compliance
33
33
34
-
-**Right to Erasure Request**— When a user submits a data deletion request under the [General Data Protection Regulation (**GDPR**)](https://gdpr.eu/right-to-be-forgotten/).
34
+
-**Right to Erasure Request**- When a user submits a data deletion request under the [General Data Protection Regulation](https://gdpr.eu/right-to-be-forgotten/) (GDPR).
35
35
36
36
### Commerce
37
37
38
-
-**Commerce Product Order Refunded**— When a user has recieved a refund for their commerce product order.
39
-
-**Commerce Product Order Paid**— When a user has paid for their commerce product order.
38
+
-**Commerce Product Order Refunded**- When a user has received a refund for their commerce product order.
39
+
-**Commerce Product Order Paid**- When a user has paid for their commerce product order.
40
40
41
41
## Configure webhooks on Creator Dashboard
42
42
@@ -51,10 +51,10 @@ To set up a webhook:
51
51
1. Navigate to the [Webhooks](https://create.roblox.com/settings/webhooks) section of the Creator Dashboard.
52
52
1. Click the **Add Webhook** button.
53
53
1. Complete the configuration fields:
54
-
1.**Webhook URL**— Specify the URL where you can receive notifications. For more information on the requirements, see [Set up webhook URLs](#set-up-webhook-urls).
55
-
2.**Name**— Use a custom name to differentiate your configuration from others. By default the value is the same as the Webhook URL.
56
-
3.**Secret** (optional) — Supply a secret if you want to verify that notifications you receive are coming from Roblox. For more information, see [Verify webhook security](#verify-webhook-security).
57
-
4.**Triggers**— Choose one or more options from the list of [supported triggers](#supported-triggers) of events for which you want to receive notifications.
54
+
1.**Webhook URL**- Specify the URL where you want to receive notifications. For more information on the requirements, see [Set up webhook URLs](#set-up-webhook-urls).
55
+
2.**Name**- Use a custom name to differentiate your configuration from others. By default the value is the same as the Webhook URL.
56
+
3.**Secret** (optional) - Supply a secret if you want to verify that notifications you receive are coming from Roblox. For more information, see [Verify webhook security](#verify-webhook-security).
57
+
4.**Triggers**- Choose one or more options from the list of [supported triggers](#supported-triggers) of events for which you want to receive notifications.
58
58
1. Click the **Save Changes** button.
59
59
60
60
<Alertseverity="info">
@@ -98,9 +98,9 @@ You can test whether the webhook you've configured can successfully receive noti
98
98
3. Click the pencil icon next to the target webhook.
99
99
4. Click the **Test Response** button.
100
100
101
-
A `SampleNotification` event is sent, which includes the **User ID** of the user who triggers the notification, as the following example schema shows:
101
+
The system then sends a `SampleNotification` event, which includes the **User ID** of the user who triggered the notification, as shown here:
102
102
103
-
```json title="SampleNotification Schema"
103
+
```json title="SampleNotification schema"
104
104
{
105
105
"NotificationId": "string",
106
106
"EventType": "SampleNotification",
@@ -115,20 +115,16 @@ If you are integrating your webhook with a third-party service, you can test it
115
115
116
116
## Verify webhook security
117
117
118
-
Once you configure your server to receive payloads, it starts to listen for any payload sent to the endpoint. If you set a secret when configuring your webhook, Roblox sends a `roblox-signature` in each webhook notification to ensure that the request actually came from Roblox. The signature is in the payload header for custom endpoints and in the footer for third-party servers.
119
-
120
-
```csv title="Signature Format with a Secret for Custom Endpoints"
118
+
After you configure your server to receive payloads, it starts to listen for any payload sent to the endpoint. If you set a secret when configuring your webhook, Roblox sends a `roblox-signature` in each webhook notification to ensure that the request actually came from Roblox. The signature is in the payload header for custom endpoints and in the footer for third-party servers.
121
119
120
+
```csv title="Signature format with a secret for custom endpoints"
122
121
t=<timestamp>,v1=<signature>
123
-
124
122
```
125
123
126
-
If you did not set a secret for your webhook, the signature will only contain the timestamp of when the notification was sent:
127
-
128
-
```csv title="Signature Format without a Secret for Custom Endpoints"
124
+
If you did not set a secret for your webhook, the signature only contains the timestamp of when the notification was sent:
129
125
126
+
```csv title="Signature format without a secret for custom endpoints"
130
127
t=<timestamp>
131
-
132
128
```
133
129
134
130
To verify a signature:
@@ -138,7 +134,7 @@ To verify a signature:
138
134
139
135
1. Extract the timestamp and signature values. All signatures for webhooks with secrets share the same format as a CSV string with these two values following by the prefixes:
140
136
141
-
-`t`: The timestamp of when the notification is sent.
137
+
-`t`: The timestamp of when the notification was sent.
142
138
-`v1`: The signature value generated using the secret provided by the Creator Dashboard configuration.
143
139
144
140
1. Re-create the base string of `roblox-signature` by concatenating:
@@ -195,9 +191,9 @@ The **variable payload schema fields** provides flexibility for webhooks to acco
195
191
196
192
1.`EventPayload` (object): Contains information specific to the `EventType` that triggered the webhook. The structure of the `EventPayload` schema varies based on the type of event.
197
193
198
-
The following example shows the payload schema of the **Right To Erasure Request** event:
194
+
The following example shows the payload schema of the **Right To Erasure request** event:
199
195
200
-
```json title="Example Schema for Right to Erasure Request"
196
+
```json title="Example schema for a Right to Erasure request"
201
197
{
202
198
"NotificationId": "string",
203
199
"EventType": "RightToErasureRequest",
@@ -221,7 +217,7 @@ If you use a custom endpoint as your webhook server instead of a third-party too
221
217
constcrypto=require('crypto');
222
218
constexpress=require('express');
223
219
224
-
constsecret='<Your secret>'// This can be set as an environment variable
220
+
constsecret='<your_secret>'// This can be set as an environment variable
0 commit comments