Webhooks
In this article, you will learn how to add and manage webhooks in Payrexx to communicate with third-party systems.
What is a Webhook?
A webhook allows one application to communicate with another application and provide it with information in real-time. For example, Application A can send a notification to Application B when a specific event occurs.
In the context of Payrexx, webhooks can be used to synchronize transactions and their status with third-party systems such as an e-commerce system or content management software.
There are plugins available for various e-commerce systems for integrating with Payrexx. If the integration is done through such a plugin, it is not necessary to create a webhook.
Creating a Webhook
To create a webhook, log into your Payrexx account and navigate to Webhooks in the main menu of the merchant administration.
Next, click the white "Add Webhook" button, which will open the following window:
[IMAGE]
Legend: Configuring a webhook in Payrexx
Name: Assign any name to the webhook. This is solely for your reference to easily identify the webhook if you create multiple webhooks.
Webhook URL: Enter the URL to which the webhook should be sent. Ensure that the URL is entered correctly. Often, you will receive the URL to be entered from the third-party system you are integrating with.
Events: Define the event or events that should trigger the webhook. The available types are "Transaction," "Subscription," and "Payout". More information can be found in the "Types of webhooks" section.
Retry on Failure: There may be instances where the webhook triggers an error at the webhook URL. By activating this checkbox, you ensure that the webhook will be retried in such cases. The attempt to send the webhook will be repeated up to 10 times.
Payrexx recommends activating this option only if required by the third-party system being integrated.
Webhook Type: Choose whether the communication between Payrexx and the third-party system should use the "PHP-Post" or "JSON" format.
Webhook Version: Select the correct version of the webhook. This information can be found in the integration guide of the respective e-commerce system, CMS, or enterprise software tool.
Send Test Data: Send a test transaction to verify if the webhook is configured correctly.
Create Webhook: Click "Add" to complete the configuration and create the webhook.
Types of webhooks
Payrexx offers the following three types of webhooks:
Transaction
Triggered when a transaction is created or when the status of a transaction changes.
Subscription
Triggered when an important event occurs in a subscription managed by Payrexx.
Payout
Triggered when a new payout is initiated in Payrexx.
Overview of Created Webhooks
If you have already created webhooks in Payrexx, you can find them by navigating to Webhooks in the main menu of your merchant administration:
[IMAGE]
Legend: Two registered webhooks for FLOW Shopsoftware and PrestaShop
Webhook Errors
When communicating between two systems via webhooks, errors can occur. Such webhook errors typically happen when the target system rejects a request or the processing of the webhook in the target system triggers an error.
The cause of webhook errors usually lies within the target system. However, they can also stem from an incorrect webhook URL or an incorrect webhook content type.
In the following section, we will show you solutions for the most common webhook errors.
Webhook errors with plugins
Plugins are available for integrating Payrexx with various e-commerce systems. If webhook errors occur in one of these integrations, we recommend the following steps:
Carefully read the documentation for the respective e-commerce integration, paying particular attention to the "Configuring Payrexx" section.
Ensure that the entered webhook URL is correct. A common error is that the spelling of the entered webhook URL does not match that of the target system. Example: https://mypage.com/payrexx-webhook versus https://www.mypage.com/payrexx-webhook
If you cannot find the error, create a support ticket and provide us with the following information:
Instance name in Payrexx
Webhook URL
Access credentials for the administration area of your third-party system
Errors with custom webhooks
If you have not used a plugin for the integration but have instead created a webhook manually, we advise you to check the logs in case of webhook errors.
To do this, navigate to Webhooks and click "Logs" next to the relevant webhook:
[IMAGE]
Legend: Opening the logs of a webhook in Payrexx
Next, click on the entry in the list of webhook requests that you want to investigate:
[IMAGE]
Legend: List of sent webhooks including status
On the right side of the screen, you will now see all the details related to the corresponding webhook request:
[IMAGE]
Legend: Details of a webhook request
If you scroll down, you will find the HTTP status of the webhook request:
[IMAGE]
Legend: Webhook request with HTTP Status 0
The HTTP status is a response from the target server, returned to the sender of the webhook (in this case, Payrexx) in the form of a numerical code. This returned value helps you identify the problem and determine how to resolve it:
If you cannot find the error, create a support ticket and provide us with the following information:
Instance name in Payrexx
Webhook URL
Access credentials for the administration area of your third-party system
Information for Developers
Additional technical information about webhooks can be found in the relevant article in our developer documentation:
Last updated