Web hooks is a simple way to integrate external authorisation and payment providers with Zaptec charging stations. Before a charging session is allowed, a web hook call (HTTP POST) is made at the external provider. Charging is only allowed if external provider authorises the request.
Steps to integrate via Web hooks
- Go to the Zaptec Portal and navigate to the installation you manage with either owner or service permission. In the portal you have the ability to configure your installation to integrate with Web hooks.
- Navigate to the Authentication tab of your Installation. This is where you can select between alternative methods of communication.
- By default, the system uses Native Authentication, which references the permissions assigned on the Installation or Chargers within the Zaptec Portal.
- If you wish to use web hooks to authenticate, this can be done by selecting Web hook authentication.
Parameters
- Authentication URL
This configuration option is used to configure the URL for an OAuth token service. If provided, before posting data to a web hook, an OAuth bearer token will be obtained from this URL.
The bearer token will be provided through the Authorization header when posting to the web hooks, i.e.: Authorization: Bearer {access_token}. This option is only applicable if calls to web hooks must be authenticated using OAuth. - Authentication payload
If authentication URL is configured, the payload is provided to the authentication URL to obtain the OAuth bearer token. Format of the payload must match your OAuth token service. The payload is posted to the authentication URL with content type. application/x-www-form-urlencoded.
Example of a plain OAuth payload: grant_type=password&username={username}&password={password}
If authentication URL is not provided, username and password from the payload will be provided in the Authorization header when posting data to the web hooks (HTTP basic).
For HTTP basic mode, the payload must be provided as a query string with username and password, i.e.: username={username}&password={password} - Session start URL
The web hook URL to call before a session is authorized to start. Sessions can be denied starting, depending on the result of the request.
If external authorization is enabled and this web hook is not provided, the installation will use ZapCloud internal authorization. - Session end URL
The URL to call after a charge session is finished (vehicle was disconnected from the charging station). - Disable authorisation when charging stations are offline
When option is enabled, charging stations will allow charging with any user or charge card if connection with control system is lost.
Updated