Class ConnectionToken

All Implemented Interfaces:
StripeActiveObject, StripeObjectInterface

public class ConnectionToken extends ApiResource
A Connection Token is used by the Stripe Terminal SDK to connect to a reader.

Related guide: Fleet management

  • Constructor Details

    • ConnectionToken

      public ConnectionToken()
  • Method Details

    • create

      public static ConnectionToken create(Map<String,Object> params) throws StripeException
      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.
      Throws:
      StripeException
    • create

      public static ConnectionToken create(Map<String,Object> params, RequestOptions options) throws StripeException
      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.
      Throws:
      StripeException
    • create

      public static ConnectionToken create(ConnectionTokenCreateParams params) throws StripeException
      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.
      Throws:
      StripeException
    • create

      public static ConnectionToken create(ConnectionTokenCreateParams params, RequestOptions options) throws StripeException
      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.
      Throws:
      StripeException
    • getLocation

      public String getLocation()
      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.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to terminal.connection_token.

    • getSecret

      public String getSecret()
      Your application should pass this token to the Stripe Terminal SDK.
    • setLocation

      public void setLocation(String 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.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to terminal.connection_token.

    • setSecret

      public void setSecret(String secret)
      Your application should pass this token to the Stripe Terminal SDK.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object