#niccol-bertozzi-129_best-practices
1 messages · Page 1 of 1 (latest)
👋 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/1358806777231184123
📝 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.
- niccol-bertozzi-129_error, 6 days ago, 18 messages
Hi, are you able to add more details to your business-use case? Are you seldemly using the reader to collect payments hence, you're thinking to disconnect eact time? Or, something else?
We document troubleshooting steps here: https://docs.stripe.com/terminal/network-requirements#troubleshooting
We do not automatically reconnect: https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=internet#automatic-reconnection. Instead, you can build a reconnection flow by storing reader IDs and attempting to connect to a known reader on startup
My current flow is to first do the connectionToken to authenticate the token.
Then I initialize the terminal.
After that I am able to do the discover and connect to a device and make the payment.
But after that what should I do? If I close my application do I have to re-authenticate the token or is there no need? Is it enough to just try to connect?
Hi there 👋 jumping in as my teammate needs to step away soon.
I get an error saying I can't reuse the same token and need to re-authenticate. Is that expected behavior?
Are you providing a connection token directly, rather than providing a function for fetching a token as our guides show, so our SDK can fetch a new token whenever it needs to?
https://docs.stripe.com/terminal/payments/setup-integration?terminal-sdk-platform=android#connection-token:~:text=Caution-,Do not cache or hardcode the connection token. The SDK manages the connection token’s lifecycle.,-Certificate pinning
to get the token I'm using
https://docs.stripe.com/api/terminal/connection_tokens/object?lang=dotnet&shell=true&api=true
and currently I run it the first time to connect to a terminal. But once a payment is made do I have to stay connected to the terminal or do I have to disconnect, what is the best practice? Also if I disconnect do I have to re-run the connection_tokens or is a connect enough?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can stay connected to the terminal, or disconnect, either is fine. Which one is best is going to be dependent on your flow.
in my response the server put the connection token api response
Also if I disconnect do I have to re-run the connection_tokens or is a connect enough?
This question doesn't make a ton of sense. The SDK should be given access to a function that can retrieve a Connection Token from your connection token generating endpoint, you shouldn't be caching those connection token values and serving them more than once. Your endpoint should fetch a new token every time it's called.
If you're just trying to discover and connect to readers again, you should simply call those functions. If the Connection Token has expired, the SDK will use the function you provided it to fetch a new one and proceed.