#NextJS Adapter Webhook Issue

1 messages · Page 1 of 1 (latest)

visual wedge
#

ngl adapter is really good
it made the process so much smooth that I didnt even realised and most of the stuff was done

#

It would be really great if the adapter could be fixed asap so I can use it in production

#

not sure but I believe the issue could be something to do with this header

#

tho i think this might be old code

#

but still

hollow bloom
#

Are you trying to call the webhook endpoint directly or are you trying to make a test payment and receiving the webhook from dodo payments?

visual wedge
#

I'm making a test payment
and when that test payment is completed ,i receive the webhook from dodopayments

#

when using a simple debugging code for webhook :

// app/api/webhook/dodo-payments/route.js

export async function POST(req) {
  try {
    const rawBody = await req.text()
    console.log('🔍 Raw webhook body:', rawBody)

    const headers = Object.fromEntries(req.headers.entries())
    console.log('🔍 Raw webhook headers:', JSON.stringify(headers, null, 2))

    return new Response('OK', { status: 200 })
  } catch (err) {
    console.error('❌ Error logging webhook:', err)
    return new Response('Error', { status: 500 })
  }
}
#

im getting proper responses from dodopayments without any issues

#

its only with the library

#

that im getting the issue

hollow bloom
#

Hi, I’ve reproduced the issue and I’m gonna release a fix in 30 mins

visual wedge
#

oh thats nice!

#

thank you so much!

hollow bloom
#

Hey @visual wedge , I just released version 0.1.7, it should take about 10mins for npm to propagate the release.

#

Thanks again for reporting the issue!

visual wedge
#

will try in a minute

#

thanks a bunch for the quick fix!

#

really appreciate it

hollow bloom
#

The pleasure is mine!

#

The release seems to be propagated, you can try it now.

visual wedge
#

Yup

#

its working!

#

thanks a bunch again!

hollow bloom
#

You’re welcome! Please feel free to DM me or create a post here if you find any other issues