View Source Stripe.Terminal.ConnectionToken (stripity_stripe v3.2.0)

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

Related guide: Fleet management

Summary

Types

t()

The terminal.connection_token type.

Functions

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.

Types

@type t() :: %Stripe.Terminal.ConnectionToken{
  location: binary(),
  object: binary(),
  secret: binary()
}

The terminal.connection_token type.

  • location 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.
  • object String representing the object's type. Objects of the same type share the same value.
  • secret Your application should pass this token to the Stripe Terminal SDK.

Functions

Link to this function

create(params \\ %{}, opts \\ [])

View Source
@spec create(
  params :: %{optional(:expand) => [binary()], optional(:location) => binary()},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

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.

Details

  • Method: post
  • Path: /v1/terminal/connection_tokens