Webhooks

You can setups webhooks to receive notifications about particular events, by creating a new webhook connection and specifying which events you want to subscribe too. You can also limit the webhooks by campaign.

How to Add a Webhook

  1. In the Home Menu go to Connections  
  2. Click + Add New and select Webhook
  3. Enter your Webhook URL for the Events needed
  4. If applicable, select Campaigns associated with the webook for transaction details to be pushed. **Leave blank if all campaigns apply

Screen_Shot_2022-11-03_at_10.13.43_AM.png

(click to expand)

 

And once configured, you can send a test event to each of your webhook endpoints.

Webhook format:

After you setup a webhook, the events that you specified will trigger a webhook notification each time they occur. This notification contains a JSON payload with this format

 

 
1{
2    "webhook_type": "order", // the webhook object type
3    "webhook_event": "order_updated", // the webhook event type
4    "webhook_event_id": "4806", // the unique webhook event id
5    "webhook_event_date": "2021-03-19 18:38:40", // the webhook event date
6    "webhook_data": { // payload of the webhook event }
7}

List of supported webhook events:

  • Order - Order is Updated or Abandoned
  • Transaction - Transaction is Completed, Skipped or Unskipped
  • Order Offer - Order Offer is Updated or Cancelled
  • Shipment - Shipment is Shipped, Cancelled or Fulfilled

Order Webhooks

 

Event Type

 

Description

 

order_updated

Whenever an order is updated. Includes events when a note is added to the order, like when a transaction or a shipment is updated.

Limited to 1 webhook per minute.

order_abandonned

Whenever an order is set as abandonned. The delay for a partial order to be set as abandonned is defined on the campaign.

The payload is similar to the api response from

/order/view/{order_id}?with=order_offers,customer,order_revisions

Example:

 
1{
2  "webhook_type": "order",
3  "webhook_event": "order_updated",
4  "webhook_event_id": "1324319",
5  "webhook_event_date": "2021-04-15 11:13:33",
6  "webhook_data": {
7    "order": {
8      "id": "223827",
9      "customer_id": "104857",
10      "customers_address_billing_id": "228286",
11      "customers_address_shipping_id": "228286",
12      "campaign_id": "2",
13      "order_notes": "Shipment #447405 was shipped with tracking number 607858298deed",
14      "created_by": "api@demo.sublytics.com",
15      "modified_by": "admin@demo.sublytics.com",
16      "date_created": "2021-04-15 11:13:33",
17      "date_ordered": "2021-04-15 11:13:33",
18      "date_modified": "2021-04-15 11:13:45",
19      "ip_address": "0",
20      "is_test": "1",
21      "order_discount": null,
22      "order_pixel": null,
23      "order_pixel_block": null,
24      "tracking1": "facebook",
25      "tracking2": "paid social",
26      "tracking3": "Prospecting",
27      "tracking4": "",
28      "tracking5": null,
29      "tracking6": null,
30      "tracking7": null,
31      "tracking8": null,
32      "tracking9": null,
33      "tracking10": null,
34      "tracking11": null,
35      "tracking12": null,
36      "tracking13": null,
37      "tracking14": null,
38      "tracking15": null,
39      "tracking16": null,
40      "tracking17": null,
41      "tracking18": null,
42      "tracking19": null,
43      "tracking20": null,
44      "user_agent": "Other|Desktop|0|0|0|0",
45      "order_offers": [
46        {
47          "id": "311858",
48          "offer_id": "52",
49          "offer_name": "Expert Mens Box - 1 month",
50          "order_offer_quantity": "1",
51          "order_offer_price": "5.00",
52          "is_recurring": "1",
53          "order_offer_upsell": null,
54          "status_type_id": "Active",
55          "connection_status_type_name": "Active",
56          "discount_id": null,
57          "cancel_type_id": null,
58          "cancel_by": null,
59          "date_cancel": "0000-00-00 00:00:00",
60          "date_reactivate": "0000-00-00 00:00:00",
61          "date_ordered": "2021-04-15 11:13:34",
62          "date_created": "2021-04-15 11:13:33",
63          "date_modified": "2021-04-15 11:13:34",
64          "order_offer_notes": "Order Offer marked as Active due to completed transaction",
65          "is_test": "1"
66        },
67        {
68          "id": "311859",
69          "offer_id": "95",
70          "offer_name": "Gift Card",
71          "order_offer_quantity": "1",
72          "order_offer_price": "25.00",
73          "is_recurring": "0",
74          "order_offer_upsell": null,
75          "status_type_id": "Complete",
76          "connection_status_type_name": "Complete",
77          "discount_id": null,
78          "cancel_type_id": null,
79          "cancel_by": null,
80          "date_cancel": "0000-00-00 00:00:00",
81          "date_reactivate": "0000-00-00 00:00:00",
82          "date_ordered": "2021-04-15 11:13:34",
83          "date_created": "2021-04-15 11:13:33",
84          "date_modified": "2021-04-15 11:13:34",
85          "order_offer_notes": "Order has reached its final billing cycle and changed status to Complete",
86          "is_test": "1"
87        }
88      ],
89      "customer": {
90        "customer_id": "104857",
91        "connection_id": "1",
92        "first_name": "Cody",
93        "last_name": "Smith",
94        "email": "cody.smith@vriostagingtestorder.com",
95        "phone": "(562)-409-0578",
96        "is_blacklist": "No",
97        "is_fraud": "No",
98        "customer_notes": "Customer created"
99      },
100      "order_revisions": [
101        {
102          "id": "3865002",
103          "modified_by": "api@demo.sublytics.com",
104          "orders_revision_type_id": null,
105          "order_revision_value": null,
106          "order_notes": "Order created",
107          "date_modified": "2021-04-15 11:13:33"
108        },
109        {
110          "id": "3865003",
111          "modified_by": "api@demo.sublytics.com",
112          "orders_revision_type_id": null,
113          "order_revision_value": null,
114          "order_notes": "Transaction created ID #853563",
115          "date_modified": "2021-04-15 11:13:33"
116        },
117        {
118          "id": "3865004",
119          "modified_by": "api@demo.sublytics.com",
120          "orders_revision_type_id": null,
121          "order_revision_value": null,
122          "order_notes": "Transaction created ID #853564",
123          "date_modified": "2021-04-15 11:13:33"
124        },
125        {
126          "id": "3865005",
127          "modified_by": "api@demo.sublytics.com",
128          "orders_revision_type_id": null,
129          "order_revision_value": null,
130          "order_notes": "Transaction created ID #853565",
131          "date_modified": "2021-04-15 11:13:33"
132        },
133        {
134          "id": "3865006",
135          "modified_by": "api@demo.sublytics.com",
136          "orders_revision_type_id": null,
137          "order_revision_value": null,
138          "order_notes": "Order marked as complete due to completed transaction",
139          "date_modified": "2021-04-15 11:13:33"
140        },
141        {
142          "id": "3865007",
143          "modified_by": "api@demo.sublytics.com",
144          "orders_revision_type_id": null,
145          "order_revision_value": null,
146          "order_notes": "Shipment #447405 was created",
147          "date_modified": "2021-04-15 11:13:34"
148        },
149        {
150          "id": "3865008",
151          "modified_by": "api@demo.sublytics.com",
152          "orders_revision_type_id": null,
153          "order_revision_value": null,
154          "order_notes": "Transaction created ID #853566",
155          "date_modified": "2021-04-15 11:13:34"
156        },
157        {
158          "id": "3865009",
159          "modified_by": "api@demo.sublytics.com",
160          "orders_revision_type_id": null,
161          "order_revision_value": null,
162          "order_notes": "Shipment #447406 was created",
163          "date_modified": "2021-04-15 11:13:34"
164        },
165        {
166          "id": "3865045",
167          "modified_by": "api@demo.sublytics.com",
168          "orders_revision_type_id": "Fulfillment",
169          "order_revision_value": null,
170          "order_notes": "Shipment #447405 was shipped with tracking number 607858298deed",
171          "date_modified": "2021-04-15 11:13:45"
172        }
173      ]
174    }
175  }
176}

 

Transaction

 

Event Type

 

Description

 

transaction_completed

Whenever a transaction is completed. This includes success and declines and all those transactions types : Sale, Refund, Void, Chargeback, Alert, Auth, Capture.

transaction_skipped

Whenever a transaction is skipped.

transaction_unskipped

Whenever a transaction is unskipped.

 

The payload is similar to the api response from

/transaction/view/{transaction_id}?with=order,transaction_order_offers,order_revisions,customer,customer_card,customer_address_billing,customer_address_shipping,merchant

Example:

 
1{
2  "webhook_type": "transaction",
3  "webhook_event": "transaction_completed",
4  "webhook_event_id": "1324324",
5  "webhook_event_date": "2021-04-15 11:13:34",
6  "webhook_data": {
7    "transaction": {
8      "id": "853565",
9      "order_offer_id": null,
10      "offer_name": null,
11      "payment_method_id": "Credit Card",
12      "transaction_type_id": "Sale",
13      "transaction_charge": "Yes",
14      "is_recent": "No",
15      "transaction_cycle": "1",
16      "transaction_attempt": "1",
17      "transaction_declined": "APPROVED",
18      "merchant_id": "4",
19      "response_code": "100",
20      "gateway_response_id": "2957",
21      "gateway_auth_code": "ABCD",
22      "gateway_response_code": "100",
23      "gateway_response_description": "Transaction was approved",
24      "gateway_response_avs": "Y",
25      "gateway_response_cvv": "Y",
26      "processor_response_text": "",
27      "currency_id": "USD",
28      "transaction_price": "30.00",
29      "transaction_discount_total": "0.00",
30      "transaction_shipping": "0.00",
31      "transaction_sub_total": "30.00",
32      "transaction_tax": "0.00",
33      "transaction_fee": "1.60",
34      "customer_balance_applied": "0.00",
35      "gift_card_applied": "0.00",
36      "transaction_total": "30.00",
37      "order_discount_total": null,
38      "check_number": null,
39      "check_amount": null,
40      "dunning_cycle_id": null,
41      "dunning_cycle_total": "0.00",
42      "quantity_discount_cycle_id": null,
43      "quantity_discount_cycle_total": "0.00",
44      "discount_cycle_id": null,
45      "discount_cycle_total": "0.00",
46      "date_scheduled": "2021-04-15 11:13:33",
47      "date_complete": "2021-04-15 11:13:33",
48      "date_cancelled": "0000-00-00 00:00:00",
49      "date_skip": "0000-00-00 00:00:00",
50      "rebill_date": "2021-05-15 04:00:00",
51      "original_attempt_date": "2021-04-15 11:13:34",
52      "cycle_revenue": "5.00",
53      "cycle_revenue_date": "2021-04-15 11:13:34",
54      "cycle_revenue_attempt": "1",
55      "date_modified": "2021-04-15 11:13:33",
56      "transaction_final": "0",
57      "transaction_charge_id": "853565",
58      "transaction_notes": "Transaction result processed",
59      "created_by": "api@demo.sublytics.com",
60      "modified_by": "api@demo.sublytics.com",
61      "offer_id": null,
62      "product_id": null,
63      "item_id": null,
64      "offer_cycle_transaction_parent_id": null,
65      "transaction_parent_id": null,
66      "parent_date_complete": null,
67      "transaction_initial_id": null,
68      "is_prepaid": "No",
69      "customer_card_type_id": "Mastercard",
70      "customer_card_bin": "411122",
71      "chargeback_date": null,
72      "chargeback_code": null,
73      "chargeback_reference_id": null,
74      "chargeback_case_id": null,
75      "odd_rebill": "0.00",
76      "odd_cancel": "0.00",
77      "transaction_total_usd": "30.00",
78      "transaction_shipping_usd": "0.00",
79      "transaction_tax_usd": "0.00",
80      "transaction_price_usd": "30.00",
81      "customer_balance_applied_usd": "0.00",
82      "transaction_fee_usd": "1.60",
83      "gift_card_applied_usd": "0.00",
84      "order": {
85        "order_id": "223827",
86        "customer_id": "104857",
87        "customers_address_billing_id": "228286",
88        "customers_address_shipping_id": "228286",
89        "campaign_id": "2",
90        "order_notes": "Shipment #447405 was shipped with tracking number 607858298deed",
91        "created_by": "api@demo.sublytics.com",
92        "modified_by": "api@demo.sublytics.com",
93        "date_created": "2021-04-15 11:13:33",
94        "date_ordered": "2021-04-15 11:13:33",
95        "date_modified": "2021-04-15 11:13:45",
96        "ip_address": "0",
97        "is_test": "1",
98        "order_discount": null,
99        "order_pixel": null,
100        "order_pixel_block": null,
101        "tracking1": "facebook",
102        "tracking2": "paid social",
103        "tracking3": "Prospecting",
104        "tracking4": "",
105        "tracking5": null,
106        "tracking6": null,
107        "tracking7": null,
108        "tracking8": null,
109        "tracking9": null,
110        "tracking10": null,
111        "tracking11": null,
112        "tracking12": null,
113        "tracking13": null,
114        "tracking14": null,
115        "tracking15": null,
116        "tracking16": null,
117        "tracking17": null,
118        "tracking18": null,
119        "tracking19": null,
120        "tracking20": null,
121        "user_agent": "Other|Desktop|0|0|0|0"
122      },
123      "transaction_order_offers": [
124        {
125          "id": "311858",
126          "offer_id": "52",
127          "offer_name": "Expert Mens Box - 1 month",
128          "order_offer_quantity": "1",
129          "order_offer_price": "5.00",
130          "is_recurring": "1",
131          "order_offer_upsell": null,
132          "status_type_id": "Active",
133          "connection_status_type_name": "Active",
134          "discount_id": null,
135          "cancel_type_id": null,
136          "cancel_by": null,
137          "date_cancel": "0000-00-00 00:00:00",
138          "date_reactivate": "0000-00-00 00:00:00",
139          "date_ordered": "2021-04-15 11:13:34",
140          "date_created": "2021-04-15 11:13:33",
141          "date_modified": "2021-04-15 11:13:34",
142          "order_offer_notes": "Order Offer marked as Active due to completed transaction",
143          "is_test": "1"
144        },
145        {
146          "id": "311859",
147          "offer_id": "95",
148          "offer_name": "Gift Card",
149          "order_offer_quantity": "1",
150          "order_offer_price": "25.00",
151          "is_recurring": "0",
152          "order_offer_upsell": null,
153          "status_type_id": "Complete",
154          "connection_status_type_name": "Complete",
155          "discount_id": null,
156          "cancel_type_id": null,
157          "cancel_by": null,
158          "date_cancel": "0000-00-00 00:00:00",
159          "date_reactivate": "0000-00-00 00:00:00",
160          "date_ordered": "2021-04-15 11:13:34",
161          "date_created": "2021-04-15 11:13:33",
162          "date_modified": "2021-04-15 11:13:34",
163          "order_offer_notes": "Order has reached its final billing cycle and changed status to Complete",
164          "is_test": "1"
165        }
166      ],
167      "order_revisions": [
168        {
169          "id": "3865002",
170          "modified_by": "api@demo.sublytics.com",
171          "orders_revision_type_id": null,
172          "order_revision_value": null,
173          "order_notes": "Order created",
174          "date_modified": "2021-04-15 11:13:33"
175        },
176        {
177          "id": "3865003",
178          "modified_by": "api@demo.sublytics.com",
179          "orders_revision_type_id": null,
180          "order_revision_value": null,
181          "order_notes": "Transaction created ID #853563",
182          "date_modified": "2021-04-15 11:13:33"
183        },
184        {
185          "id": "3865004",
186          "modified_by": "api@demo.sublytics.com",
187          "orders_revision_type_id": null,
188          "order_revision_value": null,
189          "order_notes": "Transaction created ID #853564",
190          "date_modified": "2021-04-15 11:13:33"
191        },
192        {
193          "id": "3865005",
194          "modified_by": "api@demo.sublytics.com",
195          "orders_revision_type_id": null,
196          "order_revision_value": null,
197          "order_notes": "Transaction created ID #853565",
198          "date_modified": "2021-04-15 11:13:33"
199        },
200        {
201          "id": "3865006",
202          "modified_by": "api@demo.sublytics.com",
203          "orders_revision_type_id": null,
204          "order_revision_value": null,
205          "order_notes": "Order marked as complete due to completed transaction",
206          "date_modified": "2021-04-15 11:13:33"
207        },
208        {
209          "id": "3865007",
210          "modified_by": "api@demo.sublytics.com",
211          "orders_revision_type_id": null,
212          "order_revision_value": null,
213          "order_notes": "Shipment #447405 was created",
214          "date_modified": "2021-04-15 11:13:34"
215        },
216        {
217          "id": "3865008",
218          "modified_by": "api@demo.sublytics.com",
219          "orders_revision_type_id": null,
220          "order_revision_value": null,
221          "order_notes": "Transaction created ID #853566",
222          "date_modified": "2021-04-15 11:13:34"
223        },
224        {
225          "id": "3865009",
226          "modified_by": "api@demo.sublytics.com",
227          "orders_revision_type_id": null,
228          "order_revision_value": null,
229          "order_notes": "Shipment #447406 was created",
230          "date_modified": "2021-04-15 11:13:34"
231        },
232        {
233          "id": "3865045",
234          "modified_by": "api@demo.sublytics.com",
235          "orders_revision_type_id": "Fulfillment",
236          "order_revision_value": null,
237          "order_notes": "Shipment #447405 was shipped with tracking number 607858298deed",
238          "date_modified": "2021-04-15 11:13:45"
239        }
240      ],
241      "customer": {
242        "customer_id": "104857",
243        "connection_id": null,
244        "first_name": "Cody",
245        "last_name": "Smith",
246        "email": "cody.smith@vriostagingtestorder.com",
247        "phone": "(562)-409-0578",
248        "is_blacklist": "No",
249        "is_fraud": "No",
250        "customer_notes": "Customer created"
251      },
252      "customer_card": {
253        "customer_card_id": "195544",
254        "card_type_id": "Mastercard",
255        "card_number": "411122XXXXX4444",
256        "card_exp_month": "4",
257        "card_exp_year": "2023",
258        "card_prepaid": "0",
259        "cc_bin_is_prepaid": "0"
260      },
261      "customer_address_billing": {
262        "customer_address_id": "228286",
263        "fname": "Cody",
264        "lname": "Smith",
265        "organization": null,
266        "address1": "9827 N Stelling Rd",
267        "address2": null,
268        "city": "Chandler",
269        "country": "US",
270        "state": "Hawaii",
271        "zipcode": "50600"
272      },
273      "customer_address_shipping": {
274        "customer_address_id": "228286",
275        "fname": "Cody",
276        "lname": "Smith",
277        "organization": null,
278        "address1": "9827 N Stelling Rd",
279        "address2": null,
280        "city": "Chandler",
281        "country": "US",
282        "state": "Hawaii",
283        "zipcode": "50600"
284      },
285      "merchant": {
286        "merchant_id": "4",
287        "merchant_name": "Mens Shave Club",
288        "merchant_mid_id": "",
289        "merchant_descriptor": "",
290        "merchant_phone": "333-333-4444",
291        "merchant_url": "",
292        "merchant_processing_limit": "0",
293        "merchant_processing_inforce": "0",
294        "merchant_state": "",
295        "merchant_tax": "0.00",
296        "merchant_3ds": "0",
297        "merchant_processing_perc": "5"
298      }
299    }
300  }
301}

 

Order offer

 

Event Type

 

Description

 

order_offer_updated

Whenever an order offer is reactivated, paused, unpaused, swapped or the quantity is changed.

order_offer_cancelled

Whenever an order offer is cancelled

The payload is similar to the api response from

/order_offer/view/{order_offer_id}

Example:

 
1{
2  "webhook_type": "order_offer",
3  "webhook_event": "order_offer_updated",
4  "webhook_event_id": "4779",
5  "webhook_event_date": "2021-03-19 14:46:01",
6  "webhook_data": {
7    "order_offer": {
8      "id": "145148",
9      "offer_id": "2371",
10      "offer_name": "Test Box",
11      "order_offer_quantity": "5",
12      "order_offer_price": "25.00",
13      "is_recurring": "1",
14      "order_offer_upsell": null,
15      "status_type_id": "Active",
16      "connection_status_type_name": "Active",
17      "discount_id": null,
18      "cancel_type_id": null,
19      "cancel_by": null,
20      "date_cancel": "0000-00-00 00:00:00",
21      "date_reactivate": null,
22      "date_ordered": "2021-03-19 10:58:15",
23      "date_created": "2021-03-19 10:58:12",
24      "date_modified": "2021-03-19 12:46:00",
25      "order_offer_notes": "Order quantity changed to 5. ",
26      "is_test": "1"
27    }
28  }
29}

 

Shipment

 

Event Type

 

Description

 

shipment_fulfilled

Whenever shipment information is sent to the fulfillment connection.

shipment_shipped

Whenever a tracking number is added to a shipment.

shipment_cancelled

Whenever a shipment is cancelled.

The payload is similar to the api response from

/shipment/view/{shipment_id}

Example:

 
1{
2  "webhook_type": "shipment",
3  "webhook_event": "shipment_shipped",
4  "webhook_event_id": "1324396",
5  "webhook_event_date": "2021-04-15 11:13:45",
6  "webhook_data": {
7    "shipment": {
8      "id": "447405",
9      "shipment_status_id": "Pending Tracking",
10      "shipment_tracking_id": "607858298deed",
11      "carrier_id": null,
12      "shipping_profile_id": "Free Shipping over $10",
13      "date_cancel": "0000-00-00 00:00:00",
14      "date_scheduled": "2021-04-15 11:13:33",
15      "date_complete": "2021-04-15 11:13:45",
16      "date_scan": "0000-00-00 00:00:00",
17      "date_deliver": "0000-00-00 00:00:00",
18      "date_return": "0000-00-00 00:00:00",
19      "date_rma": "0000-00-00 00:00:00",
20      "shipment_rma": null
21    }
22  }
23}

 

 

Webhook events logs

You will then be able to see each webhook sent in the related Events section, for example for order, under Order events:

 

 

Was this article helpful?
0 out of 0 found this helpful