#cynefin_30

1 messages · Page 1 of 1 (latest)

primal quarryBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

stray sequoia
#

Hello! Sorry for the delay, let me have a look...

elfin rain
#

cool

stray sequoia
#

You're not passing the raw, unaltered body. Something (probably some middleware) is parsing the body before you're accessing the raw body. Try adjusting your code so extracting the raw body is one of the very first things that happens when a new request comes in.

elfin rain
#
  rawBody: '{\n' +
    '  "id": "evt_1OegkuHdUpLJ8pAssHvaNNLR",\n' +
    '  "object": "event",\n' +
    '  "api_version": "2020-08-27",\n' +
    '  "created": 1706718920,\n' +
    '  "data": {\n' +
    '    "object": {\n' +
    '      "id": "clock_1Oee35HdUpLJ8pAsWqmLbsD0",\n' +
    '      "object": "test_helpers.test_clock",\n' +
    '      "created": 1706708515,\n' +
    '      "deletes_after": 1709300515,\n' +
    '      "frozen_time": 1738330980,\n' +
    '      "livemode": false,\n' +
    '      "name": "Test clock for cus_PTVz8K4BZQsvYt",\n' +
    '      "status": "ready"\n' +
    '    }\n' +
    '  },\n' +
    '  "livemode": false,\n' +
    '  "pending_webhooks": 2,\n' +
    '  "request": {\n' +
    '    "id": null,\n' +
    '    "idempotency_key": null\n' +
    '  },\n' +
    '  "type": "test_helpers.test_clock.ready"\n' +
    '}',

Are you talking about this rawBody to be passed into the constructEvent

STRIPE.webhooks.constructEvent(oThis.request.body, signature, oThis.endpointSecret);

stray sequoia
#

It needs to be the raw, unaltered body of the incoming request.

#

The raw string or the raw buffer.

#

Any changes to it will make the process not work.