Skip to content

docs: use raw request body in validateWebhookSignature example - #501

Open
PrincyChauhan wants to merge 1 commit into
razorpay:masterfrom
PrincyChauhan:docs/fix-webhook-raw-body
Open

PrincyChauhan wants to merge 1 commit into
razorpay:masterfrom
PrincyChauhan:docs/fix-webhook-raw-body

Conversation

@PrincyChauhan

Copy link
Copy Markdown

Fixes #500

  • Replaced the object + JSON.stringify(payload) example with a raw JSON string
  • Added an Express example using express.raw() and req.body.toString('utf8')
  • Added a note that the body must not be parsed or re-stringified before verification
  • Renamed payload to webhookBody in the parameters table for consistency

The example signature (55d3c166...459a) still matches, since the raw string is the same compact JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: validateWebhookSignature example re-stringifies a parsed object instead of using the raw request body

1 participant