#vamsi_43560

1 messages · Page 1 of 1 (latest)

terse coveBOT
#

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.

versed vigil
#

Sure

formal field
#

hello! can you share your webhook code?

versed vigil
#

endpoint_secret = 'secret'
event = None
payload = request.data
sig_header = request.headers['STRIPE_SIGNATURE']

try:
    event = stripe.Webhook.construct_event(
        payload, sig_header, endpoint_secret
    )
except ValueError as e:
    # Invalid payload
    raise e
except stripe.error.SignatureVerificationError as e:
    # Invalid signature
#

secret has 'whsec_*****'

formal field
#

if you log the payload and sig_header, what do you get?

versed vigil
#

11/01/2023 01:42:41 AM b'{\n "id": "evt_1O7RU72QbtwUevbWhuUGqLHe",\n "object": "event",\n "account": "acct_1O7RU42QbtwUevbW",\n "api_version": "2022-11-15",\n "created": 1698795395,\n "data": {\n "object": {\n "id": "ca_NfVEe4MQlEw8hKjabgCbPAuoU2qHDMME",\n "object": "application",\n "name": "KittyCash"\n }\n },\n "livemode": false,\n "pending_webhooks": 1,\n "request": {\n "id": null,\n "idempotency_key": null\n },\n "type": "account.application.authorized"\n}'
11/01/2023 01:42:41 AM t=1698802961,v1=5ba5009c61bb4e5321058bd7c4314e5b9a40ce3b105dcc1fe8ceca7a56426276,v0=c7eed111741548a92373e98a838abeabab340a220404e45a83c69123fd7fb0aa

formal field
#

the two likely possibilities here is likely that a) you're using the wrong webhook secret or b) your application is somehow modifying the raw request body somehow

versed vigil
#

let me try

versed vigil
#

issue with the secret!