Capabilities
Errors
EatNow classifies a failure on the PMS’s own answer, never on the HTTP status. A problem says whether the same request may succeed later (retryable) and
carries a stable code.
- Retryable, or no answer: the outcome is unknown. EatNow replays the same key and the same bytes, after looking the charge up by its key.
- Anything else is final: the line goes back as it was. No refusal leaves a charge in flight.
Events
Events are thin: they say what to read again, and arrive unordered. EatNow rereads the stay or the charge, keeps the greatestversion, and decides from
what it reads. A stay carries no contact: a name while in house, a reference
before.
From the PMS’s catalogue
A hotel connects from the PMS. EatNow is the authorization server: each PMS is registered there as an OAuth client, by EatNow, with itsclient_id, its
client_secret and its exact return URI.
- The PMS sends the browser to
/api/auth/oauth2/authorizewithresponse_type=code,client_id,redirect_uri,state,code_challengeandcode_challenge_method=S256. - The hotel signs in and ticks its venues.
- The PMS exchanges the code at
/api/auth/oauth2/token, form-encoded, withclient_id,client_secretandcode_verifier. GET /api/integrations/pms/places, with that token, lists what it opens:{ account: { name }, places: [{ id, label, kind, currency }] }.POST /api/integrations/pms/connections, with that token, hands a key over:{ placeId, apiUrl, propertyId, outletId, apiKey }, answered{ connectionId }.
apiUrl must be on the client’s registered origin. A handover replaces: the
same place keeps its connection and its id, even after an accepted handover
whose answer was lost. 403 covers a place outside the authorization and a
place already connected elsewhere, without saying which. EatNow then reads the
key’s scopes and declares its webhooks with the key, for those scopes only. The
token is not kept.