APIs and webhooks will help streamline communication between your existing systems and PayDocker to improve efficiency. Before moving forward, we will have to understand what are webhooks and APIs:
- Webhook Endpoint: A webhook endpoint is a URL that receives webhook event notifications and can trigger an action based on the payload sent in the message
- API Key: A unique identifier used to authenticate requests associated with a project or application when accessing an API
- Logs:
Webhooks
There is a webhook/API connection for each important category on PayDocker. These categories include:
- Add webhooks for token endpoint
- Add webhooks for booking endpoint
- Add webhooks for invoice endpoint
- Add webhooks for check out & authorisation endpoint
Webhooks are used to establish a connection between two different apps and transmit the information that you require.
URL: https://dashboard.paydocker.com/integration-webhooks
Add webhooks for Token endpoint
1. To add an endpoint, click + Add endpoint.
There will be 2 endpoint methods available for Token:
Push method
If you have selected (1) Push and select (2) Add, there will be a specific endpoint created on the webhook dashboard
Once the endpoint has been created, you can configure the information to be pushed.
Click the 3 dots, then select update details
Next, select the list of events to add to this endpoint from this drop down list.
Click Add to finalise the list of events, and select the X button to remove the events if required.
Lastly, select Update.
Read method
For Read method, you will need to provide a valid endpoint as highlighted.
Once it has been successfully added, you will see it reflected on the webhook dashboard
Similar to the Push method, you would be able to add a list of
Select the three dots then select update details
You will be able to edit the end point and create a list of events to send
Manage Token webhook endpoints
For both push and read methods, you can manage the endpoints as such. To find the other options to manage your endpoints, click the three dots.
1. Set an expiry date for the API key
Click Expire to set the timer for the expiration of the authentication key and roll the API key.
(1) Expiration - user will set an expiration date for the authentication key.
- Now
- 1 hour
- 2 hours
- 24 hours
(2) Input password - is used for server-to-server communication
(3) Roll API key - is used for server-to-server communication
2. Disable the endpoint
Once disabled, the endpoint will turn from active to suspended status.
You can choose to activate the endpoint again by selecting Active.
3. Delete the endpoint
Select delete to remove the endpoint from the list. Once the endpoint has been removed, the list will return to default.
Add webhooks for Booking endpoint
Booking endpoints have the following methods:
Push and Read methods are very similar to the previous section. You can refer to the steps above.
Pull method
Once you have selected the Pull method, you will need to provide the URL, username and password. Once successfully updated, the endpoint will be reflected on the dashboard.
Next, you will need to configure the details of this endpoint. Similarly, select the three dots and then update details.
Then, you will be prompted to adjust the timezone, frequency, or schedule of the endpoint to retrieve data.
Add webhooks for Invoice endpoint
For invoice endpoint, there will only be the read method. Refer to the above sections to see how this method works.
Add webhooks for check out & authorisation endpoint
For these 2 endpoints, there will only be push and read methods. Refer to the above sections to see how this method works.
API Keys
Each API Key has been generated on your PayDocker account for each section above (Token, booking, invoice, check out, and authorization) and should be kept confidential. You can access your API keys by clicking the link below.
URL: https://dashboard.paydocker.com/integration-keys
Here are the details of this view:
(1) Roll IP key - Set the expiration of the key here. You can set the expiration time up to 24 hours.
(2) Reveal key - when the user clicks the reveal key, it will show the secret key of the authentication of the token keys.
(3) Publishable key - is used for accessing data in public data
(4) Secret key - is used for server-to-server communication
Logs
Lastly, you can see each trigger of the API. Logs contain information for each API push for your reference. Each push will be classified as succeed or fail, and the details of the entry.
Accessing Logs
URL: https://dashboard.devpaydocker.cloud/integration-logs
1. Access this page by clicking on Integration (1), then Logs (2) in the left panel.
These categories are typically used to organize and manage log entries according to their status, making it easier for a user to monitor and troubleshoot the system or application to which these logs pertain.
Category | Details |
All | It shows all the transactions |
Succeeded | Filters the logs to show only those that have completed successfully. |
Failed | Filter the logs to show only the ones that did not complete successfully or encountered some error. |
In cases wherein you are searching for a specific API call, you are able to filter the search for your convenience.
- Logs Filter → you may narrow down the type of logs to NORMAL LOGS or SYNC LOGS.
- Date Range Filter → you may select a date range to narrow down your search.
- API Endpoint URL Filter → you can narrow your search by entering a specific endpoint url.
- Category → you can search by choosing a specific category.
- Method → you can search by choosing a specific method.
- Event→ you can search by choosing a specific event.
Status
Below are the different status of the API call done.
- 200OK (1) — if this message is stated, that means that the API call done is all okay.
- 400ERR (2) — if this message is stated, that means that the API call has failed.
Details
After selecting the specific API call, on the right-hand side of the page, you will be able to see the details of the call done. See the below image for your reference: