Const
Raw body parser middleware for Express
Captures the raw body before JSON parsing for signature verification. Use this if you need to parse JSON but also need the raw body.
import express from 'express';import { rawBodyMiddleware } from '@bates-solutions/squareup/server';const app = express();app.use('/webhook', rawBodyMiddleware);app.use('/webhook', express.json()); Copy
import express from 'express';import { rawBodyMiddleware } from '@bates-solutions/squareup/server';const app = express();app.use('/webhook', rawBodyMiddleware);app.use('/webhook', express.json());
Raw body parser middleware for Express
Captures the raw body before JSON parsing for signature verification. Use this if you need to parse JSON but also need the raw body.