Connection Tokens

A Connection Token is used by the Stripe Terminal SDK to connect to a reader.

Related guide: Fleet management

Was this section helpful?YesNo
Create a Connection Token
POST/v1/terminal/connection_tokens

The Connection Token object

Attributes

  • locationnullable string

    The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.

  • secretstring

    Your application should pass this token to the Stripe Terminal SDK.

More attributes

  • objectstring

The Connection Token object
{
"object": "terminal.connection_token",
"secret": "pst_test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LE81ZEdIalZ6NlVuMUdjM3c3WkRnN0ZYRHZxRURwTXo_00gNK2DWAV"
}

Create a Connection Token

POST /v1/terminal/connection_tokens

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

Parameters

  • locationstring

    The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.

Returns

Returns a Connection Token.

curl -X POST https://api.stripe.com/v1/terminal/connection_tokens \
-u "sk_test_Hrs6SAopgFPF0bZXSN3f6ELNsk_test_Hrs6SAopgFPF0bZXSN3f6ELN:"
Response
{
"object": "terminal.connection_token",
"secret": "pst_test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LE81ZEdIalZ6NlVuMUdjM3c3WkRnN0ZYRHZxRURwTXo_00gNK2DWAV"
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.