🍯
Integrating with honei
  • Getting Started
  • Authorization
  • Testing
  • Reference
    • API Reference
      • 📩Notifications
      • 🍔Importing catalog to honei
      • 🪑Importing tables to honei
      • 🛒Sending orders to POS
      • ✅Close order on POS
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Notifications

Each honei event will send a notification to third party server with its corresponding data.

Since all the request can take a long time, the server will provide a response once it has completed all the verifications of the submitted fields. The server will be responsible for making a callback API call to notify you if the process has been completed or if there has been an error.

For this, the support team will ask you (also you can send this to support@honei.app) for a callback endpoint where you will receive all these notifications as POST requests with this body:

{
  "": String,
  "": Number,
  "": String || Object
}

Authorization

honei will use the same authentication method so that the third party's server can verify that the requests correspond to the honei servers.

const crypto = require("crypto");

function verifyToken(clientSecret, nonce, token) {
    const hash = crypto.createHash("sha256");
    hash.update(nonce + clientSecret);
    const generatedToken = hash.digest("base64");

    if(generatedToken === token) {
        //Is a valid token
    }
}

const secret = "your_secret_here";
const token = verifyToken(secret, nonce, token);

Request headers will also contain venue-api-key referring to a specific restaurant.

PreviousAPI ReferenceNextImporting catalog to honei

Last updated 4 months ago

📩