#napolean_solo

1 messages · Page 1 of 1 (latest)

hollow tundraBOT
sand shadow
#

hello

cloud flume
#

the webhook i receive is always from the wrong customer_id
Can you explain more about this, or share a concrete example we can look at?

sand shadow
#

When i subscribe from the pricing table the webhook payload i am receiving is from an invalid customer_id and not the actual id.

But when I subscribe from the main site of stripe by manually creating a sub for a customer it send the correct customer_id in the webhook.

cloud flume
#

Can you share a specific event ID so I can look at it?

#

evt_1234

sand shadow
#

Well i wish i could but the thing is the customer_id is invalid so I can't fetch the event as it doesn't exist for the actual user.

#

is there a another workaround ?

cloud flume
#

I don't really understand what you're trying to do, then

#

I thought you were describing receiving an event with a customer id you did not expect

#

but now it seems liek you're describing something else

cloud flume
#

Can you explain exactl what you are trying to do and what is not doing what you expect?

sand shadow
#

I mean exactly what I said

cloud flume
#

the webhook payload i am receiving is from an invalid customer_id
what webhook payload?

#

Can you show me that payload?

sand shadow
#

I received an event on my endpoint but turns out it is the wrong customer_id. This is happening only when using pricing table embedded on my app.

When i create a sub manually it sends the webhook payload with correct customer_id.

I will try to get the payload

cloud flume
#

Or just the event ID, i can look that up

#

I'm not sure what you mean by "wrong" customer ID, since you don't know that ahead of time, unless there's a piece here that i am missing

sand shadow
#

i am checking the logs of my code and I can see the customer_id I am receiving is wrong and that is causing it my code to error.

Basically the customer_id of the user and the id I am receiving on my webhook, there's a big difference

#

I cannot get the event_id because as the customer_id is not in my stripe database so I cannot fetch the event

cloud flume
#

Ok if you can share an example event, and a snippet of relevant code you use to consume this, I can take a look to help understand whats going on

#

Can you give me the example customer id?

sand shadow
#

the code is all fine, it is working completely fine when i manually create sub, The issue for sure is on your end in pricing table.

cloud flume
#

I can't hlep you if you can't share more details

sand shadow
#

just give me 2 mins, I am trying to get the payload so I can show the differene

#

in the meantime let me explain:

this is the actual id of the customer: cus_Oq8EZMKhqdlFub

But when I create sub from the pricing table i get this ID: cus_P66Ey6e2emBqi7

Which doesn't exist

#

ok so got it

#

This is the actual customer_id of the customer: cus_OfQiL7oGV31aUv

And this is the event_id: evt_1OHvSUSCkgVAHKZay20utdQb

you can check for yourself

#

the customer_id doesn't match

#

This is the customer_id i am receiving my brother: cus_P67hJxgJYFBTh7

#

you there brother?

cloud flume
#

Yes, looking at customers and events around this

#

These appear to be four separate customers

sand shadow
#

hmm

hollow tundraBOT
sand shadow
#

is it the email issue? I am using a generic email for testing like tim@test.com

cloud flume
#

The issue is that you're expecting the customer email you provide in the pricing table url to be tied to the customer you separately created

sand shadow
#

but it's the same email

#

I am using the same email

cloud flume
#

Yes, but customer emails are not unique, you can have many customers with the same email, as here

#

Which points to a Dashboard setting that allows you to have those recognized customers with existing subscriptions to redirect them to the customer portal or a url you choose on your site

#

Where you can then create additional subscriptions for the existing customer

sand shadow
#

wait this doesn't explain the discrepancy in the customer_id.

cloud flume
#

or whatever you need to do

#

You're expecting the email to get mapped to that existing customer id, but that's not how that works

sand shadow
#

so it is creating a new one is what you mean>

cloud flume
#

It's expected that by default a new customer is created for each click of a payment link (or pricing table button)

#

yes

sand shadow
#

oh i see

#

ok makes sense

cloud flume
#

👍

sand shadow
#

ok thanks

cloud flume
sand shadow
#

yes I did,

white arch
#

Hi, stepping as my teammate needs to step away. Let me catch up here

sand shadow