📩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 [email protected]) 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.

Last updated