Getting started
Obtain your API key and publish your first message.
Step 1. Get your API keys
Reach out to your Partnership Development Manager (PDM) to receive your account name (accountName
) and API key (apiKey
). These are required to receive and send messages to the Tables API.
Step 2. Open a WebSocket connection to Connect
To start integrating with the Tables API, you can use our test endpoint. This endpoint allows you to simulate payments on the card machine, making it easier for you to develop and test your integration:
wss://staging-api.dojo.dev/ws/v1/tables/epos
Ensure you're using a WebSocket client that enables you to set the required headers:
Header Name | Description |
---|---|
Authorization | Basic authorization used to authenticate your requests to the API, for example Basic $authToken . The authToken is formed from Base64 encoding your accountName (first string in the URL for existing integrations) and the apiKey . The two values should be seperated by a colon with no spaces e.g. authToken = base64("abcdef0000000:7d4773f2-367f-406c-881a-b4cb854971f3") . |
reseller-id | Identifies the reseller who sells software on behalf of the EPOS company. This value will be unique and provided by Dojo to each reseller. |
software-house-id | Identifies the EPOS company whose software is generating the request. This value shouldn't be configurable as it will remain the same for all customers using particular EPOS software. This value will be provided by Dojo. |
All of these values will be provided by Dojo. If you're unsure about any of them, reach out to your PDM.
Generating the authToken
This example uses the Node.js built-in Buffer class to encode the authToken
.
const accountName = "abcdef0000000";
const apiKey = "7d4773f2-367f-406c-881a-b4cb854971f3";
const authString = `${accountName}:${apiKey}`;
const authToken = Buffer.from(authString).toString("base64");
console.log(`Basic ${authToken}`);
Step 3. Confirm the WebSocket connection
Ensure that you were able to successfully establish the WebSocket connection. Look out for any errors and reach out to your PDM if you require further assistance.
Next steps
You're now ready to start building your EPOS integration!