Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Commit 7108e68

Browse files
1 parent 18fc91c commit 7108e68

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/concepts/webhooks.md

+13
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,19 @@ const verify_signature = (req) => {
109109

110110
You can then call `verifySignature` in any JavaScript environment when you receive a webhook.
111111

112+
{% callout type="warning" %}
113+
You must create the digest using the _exact_ body string sent in the POST request.
114+
If you are using [Express](https://expressjs.com/), you need to ensure that you grab the raw body string.
115+
You'll want to use `bodyParser.raw` instead of `express.json` for getting the POST request body:
116+
117+
```javascript
118+
const app = express()
119+
app.use(bodyParser.raw({ inflate: true, type: 'application/json' }))
120+
```
121+
122+
Then you can access the body with `req.body` as shown above.
123+
{% /callout %}
124+
112125
#### TypeScript
113126

114127
```typescript

0 commit comments

Comments
 (0)