Class: Stripe::Terminal::ConnectionTokenService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/terminal/connection_token_service.rb

Defined Under Namespace

Classes: CreateParams

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object

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.



20
21
22
23
24
25
26
27
28
# File 'lib/stripe/services/terminal/connection_token_service.rb', line 20

def create(params = {}, opts = {})
  request(
    method: :post,
    path: "/v1/terminal/connection_tokens",
    params: params,
    opts: opts,
    base_address: :api
  )
end