Update webhook registrations

PUT /api/WebhookRegistrations/{registrationId}

This call updates the webhooks you are registered to where {registrationId} is the ID of the webhook.

Request attributes

Attribute

Description

registrationId
string

ID of a webhook registration.
Required

requestId
GUID

Unique identifier that accompanies every request.
Optional

callBackUrl
string

The URL that will receive messages in return.
Optional

callBackUserName
string

Authentication data that accompanies webhook API calls if the server requires authentication.
Optional

callBackPassword
string

Authentication data that accompanies webhook API calls if the server requires authentication.
Optional

merchantId
string

Unique identifier for the merchant.
Optional

isActive
boolean

True if a webhook is active, otherwise false.
Optional

deactivatedAt
DateTime

Returns the date and time a webhook was deactivated.
Optional

isInErrorState
boolean

True if the webhook is in an error state and fails to send, otherwise false.

A webhook goes into Error state when it fails to send, when a 500 is received from the endpoint to which it was sent.

Even if the webhook is in an error state, we still attempt to send it. If it succeeds, isInErrorState is false, and if it fails, isInErrorState is true.

This doesn't affect if the webhook is tried. It's a flag in the database indicating if there was a problem with this webhook.

Additionally, if a user changes the webhookregistration callbackurl, we reset iserrorstate to false.
Optional

errorStateReason
string

Returns the reason that a webhook is in an error status.

detectedErrorStateAt
DateTime

The moment that an error was detected. This is important information when troubleshooting a problem.

Response attributes

Attribute

Description

registrationId
string

ID of a webhook registration.

requestId
string

Unique identifier that accompanies every request.

callBackUrl
string

The URL that receives messages in return.

callBackUserName
string

Authentication data that accompanies webhook API calls if the server requires authentication.

callBackPassword
string

Authentication data that accompanies webhook API calls if the server requires authentication.

merchantId
string

Unique identifier for the merchant.

isActive
boolean

True if a webhook is active, otherwise false.

deactivatedAt
DateTime

Returns the date and time a webhook was deactivated.

isInErrorState
boolean

True if the webhook is in an error state and fails to send, otherwise false.

A webhook goes into Error state when it fails to send, when a 500 is received from the endpoint to which it was sent.

Even if the webhook is in an error state, we still attempt to send it. If it succeeds, isInErrorState is false, and if it fails, isInErrorState is true.

This doesn't affect if the webhook is tried. It's a flag in the database indicating if there was a problem with this webhook.

Additionally, if a user changes the webhookregistration callbackurl, we reset iserrorstate to false.
Optional

errorStateReason
string

Returns the reason that a webhook is in an error status.

detectedErrorStateAt
DateTime

The moment that an error was detected. This is important information when troubleshooting a problem.

Sample response PUT /api/WebhookRegistrations/{registrationId}

{
  "registrationId": "5Hl422DF-2TQB-Q576-W699-FH1LPPVTB100",
  "requestId": "LH497VDC-FSAB-55LD-KAC9-I074SSAGC145",
  "callBackUrl": "string",
  "callBackUserName": "string",
  "callBackPassword": "string",
  "merchantId": "848FG57C-620B-NNA8-LEW9-47AKGHA99447",
  "isActive": true,
  "deactivatedAt": "2022-12-16T09:31:35.628Z",
  "isInErrorState": true,
  "errorStateReason": "string",
  "detectedErrorStateAt": "2022-12-16T09:31:35.628Z"
}

Did this page help you?