Closed udayTechnosouls closed 9 months ago
Hi @udayTechnosouls, please review our documentation for ConnectionTokenProvider
and check that your TokenProvider
does not cache and reuse the same connection token when the Terminal SDK requests a new one.
An overview of the lifecycle of a connection token:
- When Stripe Terminal is initialized, the SDK attempts to proactively request an connection token from your backend server.
- Do not cache or hardcode the connection token.
- The SDK uses the connection to connect to a reader.
- Subsequent calls to connect require a new connection token. If you disconnect from a reader, and then call connect again, the SDK will need a new connection token from your backend server. The SDK manages the connection token’s lifecycle and will always request a new connection token automatically when necessary.
Hi @udayTechnosouls , we will be closing this ticket due to inactivity, if you continue to experience any further issues please open up a new ticket.
I got this message after attempting to disconnect one reader and then switching to another reader in the same session. I have init Terminal like
val tokenProvider = TokenProvider(STRIPE_TOKEN) Terminal.initTerminal( context = it, logLevel = logLevel, tokenProvider = tokenProvider,
After I call Terminal.getInstance().discoverReaders and then Terminal.getInstance().connectBluetoothReader
StripeTerminal I class=RestClient message="url=https://api.stripe.com/v1/terminal/connection_tokens/activate request=**** response={"error":{"message":"The Stripe Terminal ConnectionToken has already been redeemed. Please generate a new one using v1/terminal/connection_tokens.","type":"invalid_request_error"}}"