πŸ“‡Readers

This page will list out the endpoints available for managing readers.

To persist with our contextual example of an e-commerce store, they will add their device to the location they had created.

The e-commerce store will proceed to set up a physical device and the device will give them a registration code which is collected by your app and included in the registerTerminalReader() function.

Remember, the $direct variable will determine if the action is carried out on your platform stripe account or on the connected account.

(true = connected, false = platform)

Adding a reader

$store->registerTerminalReader([
    'label' => 'Main POS Reader',
    'registration_code' => $registrationCode, // Not needed for tap to pay
    'location' => '$locationID',
], $direct);

Get readers (E.G. by location)

$store->getTerminalReaders([
    'location' => $locationID,
    'limit' => 100
], $direct);

Connecting to the reader

Once the reader has been registered, your client side SDK will be able to establish a connection, in order to do this though, you must first ensure the SDK is able to retrieve a connection token which is a token that programatically represents the connection between the terminal and your application.

You can do so by building an endpoint on your API which your application or the SDK will connect to in order to obtain the tokens.

$connectionToken = $store->createConnectionToken($locationID, $direct);

return response()->json($connectionToken, 200);

Last updated