Authentication
We suggest your read the overview first, then understand the role of the health-check directive and button. Only then proceed to actual implementation details.
Overview
Before Katalys’s code and integrator’s code can securely share messages. The following needs to happen:
Integration (as part of the initial setup) has to store credentials found in the Katalys platform.
integration ID
key ID
shared secret
Integration has to provide an endpoint (URL), which will receive messages coming from Katalys. The endpoint URL has to be stored in the Katalys platform → Settings → Apps & Integrations →Integration → Settings
There are two locations that require authentication to happen:
![](../__attachments/1638006806/KS%20Bridge.png?inst-v=e2836f49-442b-4faf-9d33-a0db78ac991e)
When Katalys platform sends directives to the integration. Katalys ⇢ Merchant
Katalys platform creates a token and sends a request with directives
Integration receives the request and verifies the token before processing the directives
When the Integration sends API requests to Katalys. Katalys ⇠ Merchant
Integration generates a token using stored credentials and adds it to request header before sending the request to the API.
Katalys’s API will verify the token and process the request
Health-check directive
Health check is triggered from Katalys platform’s UI. It will send a health-check directive payload with a token to the integration’s URL. The integration is expected to verify the token first, then proceed to generate a token and make an authenticated request to Katalys’s API. If all of the above succeeds, we can consider the two systems connected.
![](../__attachments/1638006806/Untitled.png?inst-v=e2836f49-442b-4faf-9d33-a0db78ac991e)
Next steps
Katalys ⇠ Merchant
Katalys ⇢ Merchant
Example: generating a PASETO token