Before you start
- Server-to-server authentication must be working. See API authentication.
- The store must exist in Lobyco with the same
storeIdyou send here. See Importing store and chain data.
The procedure
1
Choose the identifier
The payment location identifier is the key the POS sends in every check-in and payment call. It must be unique across your whole estate and stable over time. Lobyco recommends{storeId}_{posId}, which names both the store and the till and stays readable in logs.2
Register the location
POST /v1/payment-locations/{paymentLocation}/setupSend three things:storeId, the store the checkout is in.qrCode, the value printed on the sticker at that checkout.type,CashierorSelfCheckout.
Failure and edge cases
A200 OK means the location is registered. To check it later, read it back with GET /v1/payment-locations/{paymentLocationId}, which returns the store, the type, the QR codes and the current check-in state.
- A QR code belongs to one location only. If the code is already assigned to another payment location, the call fails. Send
force: trueto move the code to this location, for example when a sticker has been moved to a different till. - The location must exist before check-in and payments. A check-in or a payment call for a payment location Lobyco does not know fails. Register locations when a checkout is commissioned, not on its first sale.
API reference
Endpoint documentation: Payment Coordinator.Related
- Registering at POS — the check-in flows this location takes part in.
- Payments — creating and capturing a payment at this location.