Payment Cancellation Webhook

Payment Cancellation Webhook

 

In this article, you will learn how to set up the Payment Cancellation webhook and enable email notifications to notify salespeople if there is an error during the synchronization process with an external system so they take appropriate action.

User Roles: Admin and Setup.


Step one: Create the Payment Cancellation Webhook in Your System

When creating the endpoint in your system, it is important to consider the following details:

URL: https://theexternalsystem.com

Content-Type: application/JSON

Method: POST


companyId (integer)

Company ID.


paymentId (integer)

Payment ID.


paymentNumber (string)

Payment number.

{ "companyId": 6316, "paymentId" : 222125, "paymentNumber": "2271" }
{ "companyId": 6316, "paymentId" : 222125, "paymentNumber": "2271", "orderIds": "17899,17900" }

Response

Content-Type: application/JSON


Body

status (boolean)

Result of the request.

Valid values: 0 = Error | 1 = Success


message (string)

This parameter allows you to enter a customized message describing the status. The message will be reflected in Komet Sales.


Response Example

{ "status":"1", "message":"<<Custom Success Message>>"

 

Back to top


Step two: Set up the Payment Cancellation Webhook

Once you have created the endpoint in your system, you need to add it to your Komet Sales account.

To add your endpoint, do the following instructions:

  1. Go to Setup and select Settings.

  2. Click on Webhooks from the Integrations group of settings.

  3. Select Payment Cancellation from the dropdown list.

  4. Enter the URL that Komet Sales will call when this webhook is triggered.

  5. Select your authentication type:

    1. Basic. Enter your username and password.

    2. Bearer Token. Enter your authentication token.

  6. Enter the email addresses that the system will notify when an error occurs in the external system in the Error Notification field. You can enter up to 5 email addresses.

  7. Click on Save.

This URL is the one you created from your external system in step one.

PaymentCancellationWebhookConfig.mp4

 

Back to top


Error Notification sample

This is an example of the email notification the users will receive.

image-20250915-211724.png

 

Back to top