#Bart
1 messages · Page 1 of 1 (latest)
Can you share the request ID (req_xxx) that returned you this error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_Vk6oIogQFdBzGk is to create a customer, not to create a terminal location: https://dashboard.stripe.com/test/logs/req_Vk6oIogQFdBzGk
req_YEOuNws2oF0fyM
maybe this one?
everytime i execute the code above
i get an error of line1
the code aint even executing because line1 dosent exist
req_YEOuNws2oF0fyM is also a customer creation request
yea i found out its the sdk issue
the line1 dosent exist
line1: '1272 Valencia Street',
city: event["city"],
state: event["state"],
country: event["country"],
postal_code: event["postal_code"],
},```
the code looks correct to me
yes but line1 dosent exist
If you run the sample code here, does it work for you? https://stripe.com/docs/terminal/quickstart?lang=python
Which version of Stripe Python library are you using?
I use your address code with same line1 and it's working fine
let me check which version of Stripe python library I'm using
I use v4.2.0 and it's working fine as well
Can you double check if you're using the latest v4.2.0?
hm
oe sec
my lambda should be using the same version
yup even on my personal device running 4.2.0 for sure
its not working
# Set your secret key. Remember to switch to your live secret key in production.
# See your keys here: https://dashboard.stripe.com/apikeys
stripe.api_key = "sadasd"
# Set your secret key. Remember to switch to your live secret key in production.
# See your keys here: https://dashboard.stripe.com/apikeys
stripe.terminal.Location.create(
display_name="TEST ACC 1",
address={
line1: "932 N Emily st",
city: "Anaheim",
state: "CA",
country: "US",
postal_code: "92805",
},
metadata={
connected_account: "acct_1M3rMzQlK4wcdOog",
},
)
print(body)
please remove the secret key as this is a public channel
done sorry
ah
i found out why
the key should be a string, for example: 'line1' instead of line1
can you try to put the key into a string and check if it works?
This is how it should look like: https://github.com/stripe/stripe-python/blob/v4.2.0/tests/api_resources/terminal/test_location.py#L13-L19
the doc probably has an error. i'll report to the team once you confirm the issue is resolved
will do, I'll confirm in a few minutes
@true inlet yup
works!
documentation is outdated
great! i'll report to the team to update the documentation
yea alot of the docs need to be updated i encountered this issue with alot of other stuff a while back
Thanks for letting us know. If you see any outdated documentation in the future, feel free to report to https://support.stripe.com/contact. Our team will verify and update the doc accordingly 🙂