#ash_code

1 messages ¡ Page 1 of 1 (latest)

tender valveBOT
#

👋 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/1387122725855952938

📝 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.

stable flume
#

hello! just want to acknowledge your question - i'm working in another thread but i'll get back to you asap

prime vale
#

sure no issues thankyou

stable flume
#

still wrapping up the other thread, but can you share the exact error message you're receiving?

prime vale
#

wait

#

pls

#

ill give u that

#

": Publishable key should not be used for connection token . We should use secret key"

#

this is what i get

#

sometimes i get this

#

sometimes it fetches 0 locations

stable flume
#

hmm i can't find that exact error string anywhere. can you share the code where you're generating the connection token?

prime vale
#

so we get a connection token from the api

#

which we use to init terminal

#

and the next step is fetching locations

#

fetch locations is not finding any locations

#

for eg:

pk_test_51L0BIlKAgPwcn0onUKOo4fj6D2Y5wo7faOQL70pLyiVaXjFxeOJvz21QucchJ3ntDopoAlFkxoQXyV4lwTjZ4zfT00VAnVtUI6

#

this is what i get

stable flume
#

can you explain what you mean by "this is what i get"? that looks like a public key, not a connection token. is that what you're getting back from your connection token function?

prime vale
#

yes

#

so my api gives me a connection token

#

which looks like this

#

this is what we implemented with 3.3.0

stable flume
#

is there any chance you can share a request ID from when your backend creates a connection token?

prime vale
#

okay

#

pls give me some time

#

keep this thread open

#

pls

#

let me get that for you

stable flume
#

yep! i'm still here

prime vale
#

i need to ask my backend team for that info

#

which can take time

#

will u still be online?

stable flume
#

if you want to ask them i can see if i can find anything on my end real quick

#

are you getting anything back that looks like this when your frontend gets a connection token?
pst_test_************************

#

the key you shared earlier looks like a public key, so i'm wondering if your backend team just configured the API in a weird way where it's returning the public key instead of the connection token

#

i think this might be an example request: req_JuKCizvHePr2kc. this was created about 30 minutes ago, 2025-06-24 17:57:37 UTC

prime vale
#

yes thats what is happening

#

in our older application the api is returning a connection token that looks like the format i showed u above

#

transcation request id : 280248

token: pk_test_51L0BIlKAgPwcn0onUKOo4fj6D2Y5wo7faOQL70pLyiVaXjFxeOJvz21QucchJ3ntDopoAlFkxoQXyV4lwTjZ4zfT00VAnVtUI6

#

can u check based off of this information

stable flume
#

again, that is a public token and not a connection token, so i think your backend is doing something strange here

#

that also lines up with the error you're reporting - it's asking you to not use the public key

prime vale
#

i agree, cus for our other application we are getting secret which perfectly works, but our older application did support the strange thing - it was during terminal 3.3.0. I just want to know how it worked eariler now its not

#

i dont see any breaking change in changelog

#

we are now at 4.2.0

tender valveBOT
slow basalt
#

Hello
Taking over here

Do you have a backend that you use to retrieve Connection Tokens OR are you hard coding Public/Secret key on your client-side code and make a raw HTTP request directly to Stripe?

prime vale
#

not client side

#

we get it from backend

#

no hardocing cus we dont want to expose our keys

slow basalt
#

Gotcha. Can you share the code snippet from your backend?

prime vale
#

its a legacy application, which i dont have access to

#

we only the implementation part

#

but not the code

slow basalt
#

I'm not sure what you mean by "implementation but not the code"

prime vale
#

i dont have access to code snippets

#

is what i mean

#

for backend code

#

sorry fot the confusion

slow basalt
#

It'll be near impossible to figure out what's going on without looking at the exact code

prime vale
#

i just wanted to know if it was ever possible to get locations based off of our old implementation

slow basalt
prime vale
#

if i can find that breaking change in ur changelog it would be great

prime vale
#

this is what we have also in our new app

#

but with our connection token -> which looks like the above format i have shared

#

doesnt return any locatoins

slow basalt
#

pk_test_123 is not a connection token. It's your publishable key

#

I don't believe publishable keys can be used to retrieve locations

#

Connection Token format is pst_test_123

prime vale
#

yes i agree but this is how it worked earlier for us

#

for our old app

#

we used terminal 3.3.0

#

i just want to know will this ever work ?

#

according to u

slow basalt
#

Android or the iOS SDK?

prime vale
#

android

slow basalt
#

The only change I recall was - https://github.com/stripe/stripe-terminal-android/blob/master/CHANGELOG.md

When connecting to a reader, you may want to display a list of Locations in your app. To enable this, the SDK provides the Terminal.listLocations method that takes the same parameters as the List all Locations API endpoint.

As far as I know, that also expected a Connection Token (not the publishable key)

Anyhow, no it won't work with the new SDK versions.

prime vale
#

okay thank you so much

slow basalt
#

NP! Happy to help

#

I'd highly recommend working with your team to figure out what your backend is responding with so that you can integrate the SDK in the correct way

prime vale
#

Are you saying you're not seeing any locations when you get the response?- correct

#

it shows me 0 locations

#

yes i understand

#

we are checking one thing

#

I will confirm in 2 mins