Webhooks

Modified on Tue, 18 Feb at 12:42 PM

Webhooks allow software applications to automatically send messages or information to other systems. In Strictly, webhooks are sent using POST, and the success status code should be 200.


1. Visit the Administration tab in the side navigation and select Webhooks.


2. Use the toggle switch to activate or deactivate your webhook configurations.


3. Fill out the required fields and select the events to be sent to the webhook. Events can include Sale, Auth, Capture, Void, Refund, Invoice Paid, Payment Link Paid, and Subscription Paid.


4. If authentication is required, add the necessary details in the Authentication section.


5. Click the Save Changes button at the top-right of the page.


Examples


Success Sale with CASH

{
  "_id" : ObjectId("6679c388e32ac6f528894a8f"),
  "server" : {
    "path" : "https://webhook.site/a6dd8ff1-1111-1111-1111-58ab15fb8292",
    "username" : null,
    "password" : null
  },
  "action" : "sale",
  "data" : {
    "paymentId" : "6679c341e32ac6f528894a85",
    "clientId" : ObjectId("5ef0d0a76f1194001bc6accd"),
    "clientName" : "Coders",
    "order" : {
      "shipping" : 0,
      "federalTaxes" : 0,
      "amount" : 600,
      "tax" : 0,
      "discount" : 0,
      "customValues" : [
        {
          "key" : "External ID",
          "label" : "External ID",
          "value" : "76"
        },
        {
          "key" : "test",
          "label" : "test",
          "value" : "54"
        }
      ],
      "totalAmount" : 600,
      "products" : [ ]
    },
    "currency" : "USD",
    "paid" : true,
    "amount" : 600,
    "surcharge" : 0,
    "percent" : 0,
    "status" : "sale",
    "paidAmount" : 600,
    "paidAmountSurcharge" : 0,
    "amountRefunded" : 0,
    "surchargeRefunded" : 0,
    "error" : false,
    "transactionErrorMsg" : null,
    "statusList" : [ "sale" ],
    "sendReceipt" : false,
    "settled" : false,
    "transactionId" : "3000000244",
    "paymentType" : "cash",
    "paymentMethod" : {
      "cardType" : "",
      "name" : "",
      "last4" : "",
      "exp" : "",
      "type" : "CASH"
    }
  },
  "date" : ISODate("2024-06-24T16:20:02.393-04:00"),
  "attempted" : 3,
  "failed" : true,
  "failureMessage" : "Request failed with status code 404",
  "sendAt" : null,
  "createdAt" : ISODate("2024-06-24T15:05:44.532-04:00"),
  "updatedAt" : ISODate("2024-06-24T15:50:02.394-04:00"),
  "__v" : 0
}
JavaScript

Success Sale with Card Payment

{
  "_id" : ObjectId("65893a0cb2e5c48ee301076a"),
  "server" : {
    "path" : "https://webhook.site/a6dd8ff2-1111-1111-1111-58ab15fb8292",
    "username" : null,
    "password" : null
  },
  "action" : "sale",
  "data" : {
    "paymentId" : "65893a0bb2e5c48ee300fec8",
    "clientId" : ObjectId("5ff76fb63bcf0a001c6228e0"),
    "clientName" : "Coders",
    "order" : {
      "shipping" : 0,
      "federalTaxes" : 0,
      "amount" : 100,
      "tax" : 0,
      "discount" : 0,
      "customValues" : [ ],
      "products" : [ ]
    },
    "currency" : "USD",
    "paid" : true,
    "amount" : 100,
    "surcharge" : 3,
    "percent" : 3.0,
    "status" : "sale",
    "paidAmount" : 100,
    "paidAmountSurcharge" : 3,
    "amountRefunded" : 0,
    "surchargeRefunded" : 0,
    "error" : false,
    "transactionErrorMsg" : null,
    "statusList" : [ "sale" ],
    "sendReceipt" : true,
    "settled" : false,
    "transactionId" : "20111111111",
    "paymentType" : "credit",
    "card" : {
      "cardType" : "visa",
      "last4" : "9986",
      "exp" : "10/24",
      "type" : "credit"
    }
  },
  "date" : ISODate("2023-12-25T03:15:08.441-05:00"),
  "attempted" : 1,
  "failed" : false,
  "failureMessage" : null,
  "sendAt" : ISODate("2023-12-25T03:15:09.213-05:00"),
  "createdAt" : ISODate("2023-12-25T03:15:08.447-05:00"),
  "updatedAt" : ISODate("2023-12-25T03:15:09.214-05:00"),
  "__v" : 0
}
JavaScript

Fail Refund with Card Payment

{
  "_id" : ObjectId("67574edb06824941ba1093f8"),
  "server" : {
    "path" : "https://webhook.site/a6dd8ff1-1111-1111-898f-58ab15fb8292",
    "username" : null,
    "password" : null
  },
  "action" : "refund",
  "data" : {
    "paymentId" : ObjectId("65717f0e884e34b3bb13e3ac"),
    "clientId" : ObjectId("5ef0d0a76f1194001bc6accd"),
    "clientName" : "Coders",
    "order" : {
      "shipping" : 0,
      "federalTaxes" : 0,
      "amount" : 5,
      "tax" : 0,
      "discount" : 0,
      "products" : [ ],
      "customValues" : [ ],
      "totalAmount" : 5
    },
    "currency" : "USD",
    "paid" : false,
    "amount" : 5,
    "surcharge" : 0,
    "percent" : 3.0,
    "status" : "refund",
    "paidAmount" : 5,
    "paidAmountSurcharge" : 0,
    "amountRefunded" : 5,
    "amountToRefund" : 5,
    "surchargeRefunded" : 0,
    "error" : false,
    "transactionErrorMsg" : null,
    "statusList" : [ "sale", "refund" ],
    "sendReceipt" : true,
    "settled" : true,
    "transactionId" : "20452842203",
    "paymentType" : "credit",
    "paymentMethod" : {
      "cardType" : "credit",
      "name" : "John Doe",
      "last4" : "1007",
      "exp" : "10/24",
      "type" : "CARD"
    }
  },
  "date" : ISODate("2024-12-09T16:30:17.043-05:00"),
  "attempted" : 3,
  "failed" : true,
  "failureMessage" : "read ECONNRESET",
  "sendAt" : null,
  "createdAt" : ISODate("2024-12-09T15:11:07.158-05:00"),
  "updatedAt" : ISODate("2024-12-09T16:00:17.043-05:00"),
  "__v" : 0
}
JavaScript

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article