#ismail-RN-terminalReader

1 messages ยท Page 1 of 1 (latest)

dense sableBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

maiden lion
#

Hi ๐Ÿ‘‹

Do you not have a location registered with your Stripe Account?

plucky totem
#

Hi @maiden lion ,
Yes, we do

maiden lion
#

Is using the Location API to register the reader with in on the server someting you are trying to avoid?

plucky totem
#

If possible. Yes.

maiden lion
#

Any reason why?

#

It would be the easiest path to success here

plucky totem
#

I'd have to reach out to the backend developer.
Following this path, we'd create a new stripe terminal location prior to iniating the bluetooth connection, I assume the api returns the locationId which will be used as the locationId, is this correct?

const locationId =  await createTerminalLocation(...args);

    const { reader, error } = await connectBluetoothReader({
      // Since the simulated reader is not associated with a real location, we recommend
      // specifying its existing mock location.
      reader: cardReader,
      locationId,
      autoReconnectOnUnexpectedDisconnect: true,
    });
 
maiden lion
#

You would only need to create a new location if the reader was moved to a new physical location that you needed to model

#

For things like, say, farmers markets the location can even just be a city

plucky totem
#

Does the card reader have access to the location? Because I thought we'd only create a location if its reader.locationId is undefined

maiden lion
#

But you could design your app to create new locations and register readers with them to handle scenarios where the card reader needs to move around.

#

If the reader's location property is undefined, you only need to create a location for it if that location does not exist already.

#

For Instance:
In my test integration I have 4 readers registered but only 1 location. Each of the readers is registered to that location

plucky totem
#

Were they smart or bluetooth readers?

maiden lion
#

And, in fact, you could have multiple locations already created for your account and simply change the location on connection by specifying a different ID

#

Were they smart or bluetooth readers?
Both: S700, Wise POS E, Chipper 2X, and M2

plucky totem
#

Kindly assess my understanding on this.

  • If a new card reader hasn't been previously connected, or location has changed, I should create and assign it to the bluetoothReaderConfiguration.
  • If I already have exisiting locationIds, I can fetch and use them instead.
  • If a reader has been connected before, it can maintain the previous locationId which I can use.
dense sableBOT
maiden lion
#

If a reader has been connected before, it can maintain the previous locationId which I can use.

This is the only one I'm uncertain of. My integrations have always specified a location ID when connecting to the reader. I would test this and have the option to pass an existing location ID as a fallback.

plucky totem
#

I think the locationId is used to track where payments have been made. It should be fine to have multiple readers within a single state that use the same locationId.
In this case I'd need to create a single location As you mentioned before), and assign it the the bluetooth configuration.

Correct?

maiden lion
#

I think an entire state might be a bit broad. You might need to create different ones for each city, for example. But essentially your understanding is correct

plucky totem
#

This is an interesting case, as I'd need to check locations and choose whether to create a location accordingly.
One more thing. When I assign a locationId to the bluetoothConfig. This is where the card reader gets and stores the locationId that can later be reused?

maiden lion
#

Yes,

plucky totem
#

I now have a clearer understanding of both the connection process and the reader registration.

You've been very helpful, thanks @maiden lion.
Have a great day!

maiden lion
#

Great ๐ŸŽ‰ I'm glad this conversation has been helpful ๐Ÿ™‚

#

I'm going to close this thread but if you have questions later on you are welcome to come back to the main channel and ask them there.