#zeke_error

1 messages ยท Page 1 of 1 (latest)

primal flameBOT
#

๐Ÿ‘‹ 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/1345139199560388669

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

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.

dusk siren
#

If you would like to see my full webhook log I can Copy & paste it!

#

hello?

hearty surge
#

Hi there! I'm taking a look.

#

Can you share the webhook log please?

dusk siren
hearty surge
#

Can you share the API request ID

dusk siren
#

where can I find such.

#

req_Vdg3IsJ4JzThft

hearty surge
#

This request is for creating a checkout session.

dusk siren
#

Yes you were not clear on which Request. This is the only request showing after the checkout.

#

this?

#

req_tiZ8kOHG2ICLOw

#

or this guy? req_8N72bdDV3RNj4S

hearty surge
#

I was looking for the request that triggered the webhook event. That being said, this seems to be tied to the userid being undefined

#

Where is that being pulled from? As that meant to be the customer_id?

dusk siren
#

Yes, thats what the webhook says I was wondering about some more explaination about that error. Have you ever seen it?!

#

hmmm let me check

#

**When I replace it with the " customer_id" I still get the webhook response of **
โŒ Missing required session data: {
customer_id: undefined,
subscription: 'sub_1QxbY5IYhOvByvWrWyCZaB3t'
}

hearty surge
#

You just changed attribute. I meant, are you trying to pass the customer_ID as the userid in this case. Looking at the webhook log, I see customer which has the Stripe customer ID

Processing completed session: {
  clientReferenceId: null,
  subscriptionId: 'sub_1Qxb78IYhOvByvWrBxgtjlvG',
  metadata: { tier: 'STARTER' },
  customer: 'cus_RrJkhFgvkp2QRY'
}
dusk siren
#

Should I not be trying to pass the customer_ID ad the userID?

#

const userId = session.client_reference_id || session.metadata?.userId;

export async function POST(req: Request) {
try {
const body = await req.json();
const { tier, priceId, userId, email } = body;

#

**Here is what im passing **

pale dock
#

Hi there ๐Ÿ‘‹ I'm jumping in as there seems to be some overall confusion here.

It sounds like you're receiving an Event on your webhook endpoint that we're sending, trying to process the data within it and interact with your database when doing so, and then returning a 500 to us because that is crashing. Stop me if my understanding sounds wrong.