#ugudango_webhooks

1 messages ยท Page 1 of 1 (latest)

gilded tapirBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1225787893902217288

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tulip parcelBOT
swift wigeon
#

hi! what's the event ID evt_xxx of a webhook event where this happens?
can you share the exact code you're using in your endpoint?

loud crane
tulip parcelBOT
swift wigeon
loud crane
#

mhm, let me try that

#

our file is not typescript, so will this do?

const buffer = (req) => {
    return new Promise()((resolve, reject) => {
        const chunks = [];

        req.on('data', (chunk) => {
            chunks.push(chunk);
        });

        req.on('end', () => {
            resolve(Buffer.concat(chunks));
        });

        req.on('error', reject);
    });
};
swift wigeon
#

not sure, seems ok at first glance

loud crane
#

buf: <Buffer 7b 0a 20 20 22 69 64 22 3a 20 22 65 76 74 5f 31 50 32 43 4b 72 46 51 31 38 45 4e 63 31 33 64 52 4f 68 57 49 78 64 75 22 2c 0a 20 20 22 6f 62 6a 65 63 ... 875 more bytes>

secret last 4 chars: rWY7

#

oh wait, I made a mistake

#

i sent you a production event ID and this is a development secret

swift wigeon
#

yeah that could be the problem

loud crane
#

evt_1P2BuoFQ18ENc13dv1D8tE4Q this is an event ID from dev

swift wigeon
#

the secret for that endpoint should be the one ending in IFGs

loud crane
#

that is in production yes

#

what do you suggest? is the secret rWY7?

#

for that other evt ID?

sterile pilot
#

Yeah that looks to be the correct one for your test endpoint

loud crane
#

but i am still getting the error

sterile pilot
#

Ok so you have a production and a test integration?

#

And they're both failing?

#

Have they ever worked?

loud crane
#

it stopped working as we migrated our Stripe account to a new Stripe.. I changed API keys and secret keys, as well as webhook secret

#

previously it worked fine

#

but minimal changes to the code was made, the webhook part was not even touched :/

sterile pilot
#

Ah ok that context helps

#

So it was working with the same code on the previous stripe account?

#

Did your infra change at all?

loud crane
#

infra as in infrastructure?

sterile pilot
#

yeah

#

Did you change cloud providers, etc?

#

Or using exact same set up as before?

loud crane
#

same

sterile pilot
#

I see. Nothing changed at all there? Not config changes?

#

Because that's a common cause for the error you're getting

loud crane
#

i mean there were minimal changes, especially to that file

#

config as what exactly? .env file or something else?

sterile pilot
#

Specifically infra config changes