#2Clutch - Python Client

1 messages ยท Page 1 of 1 (latest)

calm nexus
#

Hi ๐Ÿ‘‹

#

Could you share the doc you got this snippet from?

#

The current version is 2.64.0 and was updated 29 days ago.

#

I can confirm this error is still present in the Python library

stripe.error.SignatureVerificationError
<class 'stripe.error.SignatureVerificationError'>
>>> stripe.version.VERSION
'2.64.0'
odd cairn
#

and yes, i'm using the latest version

#

i don't know why my IDE is complaining though

calm nexus
#

So it does not error out?

odd cairn
#

well, not but that's because my token is being validated successfully (i think)

#

i do not have another slightly unrelated question.

#

when dealing with the object returned by a checkout.session.completed, there's a customer field, but there's no customer_id field.

#

are they one and the same?

worldly furnace
#

Hello, stepping in cand catching up!

#

customer in that even is the Id

odd cairn
#

do you mind rephrasing? i'm not sure i understand.

worldly furnace
odd cairn
#

yeah, i've used and i'm able to listen to the events

#

but i'm looking for customer_id but i only see customer

#

does customer == customer_id?

#

i'm getting back the following

worldly furnace
#

Its customer

#

and the value is the customer Id

odd cairn
#

i'm confused because you're repeating what i'm saying and i'm not sure if i should take as a yes or a no

#

if you visit that url, you'll see what i mean

worldly furnace
#

Sorry for the unclear answer

#

but i'm looking for customer_id but i only see customer

#

customer is correct. You should look for customer . And the value you will get inside it is a "customer id" cus_xxx

odd cairn
#

ok got it.

#

is there any cons to not verifying the event before handling it?

worldly furnace
#

You should always verify the event, or you won't know for sure it comes from Stripe