Skip to main content

Register/Change Webhook

Register a new webhook to receive messages of a certain type. Case If a previous configuration already exists, the data will be overwritten.

The call must be made using the POST method.

URL
{BaseUrl}/api/v1/webhooks
HTTP Request Body
{
"url": "https://test2.com",
"authorization": "authorization_value"
}

Description of Attributes

ATTRIBUTEDESCRIPTIONTYPE
url
(Required)
Destination address of the webhook messageSTRING
255 character limit
starting with https://
authorization
(Optional)
Value that will be sent in the Authorization header to prove that it is Pay2m that is sending the messageSTRING
100 character limit

If successful, a message will be returned informing the success of the operation with code HTTP 201 in case of registering a new webhook configuration, and HTTP 200 for updating the data.

HTTP 201 Response Body - Example
{
"message": "Operation succeeded"
}