Attributes and request
TUTORIAL
1. Choose the type of event you want to receive. You can set more than one type of
events
;
2. intarget
place the destination URL where the Wirecard should send the webhooks;
3. the possible value inmedia
should be WEBHOOK .
TIP
If you do not have an URL available you can use the Beeceptor service to do your webhook receivement tests. To do this, simply access the beeceptor website and generate a URL.
1. Access the website, to create an URL, click on "Create Endpoint";
2. copy the generated URL and use it in the value of thetarget
of the request to create notification preference .In this way, Wirecard will send the webhooks to the generated URL and you will be able to see the notifications you received there.
Attention
Beeceptor is just a tool that must be used in order to test your application. The generated URL is temporary and you should switch to a permanent URL as soon as you have one.
Receiving webhooks at different URLs
You can receive your webhooks at different URLs.
1. It is possible to receive different events at different URLs. For example, you can receive notifications to ORDER. *
at one URL and notifications to PAYMENT. *
At another URL. For this, you must make a request for each event. See the example below:
Receiving the ORDER webhooks at an URL:
{
"events":[
"ORDER.*"
],
"target":"https://requestb.in/1cm5ayt1",
"media":"WEBHOOK"
}
Receiving the PAYMENT webhooks at another URL:
{
"events":[
"PAYMENT.*"
],
"target":"https://requestb.in/szr4cvsz",
"media":"WEBHOOK"
}
2. There is no limit on the number of registered URLs, that is, you can create as many notification preferences as you prefer.
3. It is possible for the same webhook to be sent to different URLs. To do this, create different requests for each URL. Take the example:
Request 1
{
"events":[
"ORDER.PAID",
"PAYMENT.SETTLED*"
],
"target":"https://requestb.in/1gvew421",
"media":"WEBHOOK"
}
Request 2
{
"events":[
"ORDER.PAID",
"PAYMENT.SETTLED*"
],
"target":"https://requestb.in/14v2gx31",
"media":"WEBHOOK"
}