Webhooks

In this article:

What are Webhooks?

How to set up Webhooks?

Available events


What are Webhooks?

Webhooks, also referred to as web callback or HTTP push API, is an integration tool that helps to keep track of events that are happening in your store. The integrated app provides real-time information and updates about particular events connected to your store.

How do I set up Webhooks?

To enable Webhooks in your Sellfy store, you first need to create your own Webhook

Once you've created your Webhook, you can enable the integration. To do so, you'll need to provide the Title and URL of the address that you'll use to collect and work with this event data.

Technically, Sellfy creates HTTP POST requests with JSON data to the user-provided URL in the webhooks.

Available events

Type Description
New order Occurs whenever an order payment is completed or payment status is changed.
Email subscribe Occurs whenever a customer is subscribed to your newsletter list.
Email unsubscribe Occurs whenever a customer is unsubscribed from all emails.
Subscription product bought Occurs whenever a customer makes a purchase for a subscription product. This event will recur each time the subscription renews. 
Subscription product canceled Occurs whenever a customer cancels a subscription.
Cart abandoned Occurs whenever a customer gives consent to receive emails and doesn't complete the checkout process.
Contact form submitted Occurs whenever a customer fills and sends a contact form. 

New Order event

{

"id": "dmnVQFUm", // Unique transaction ID

"status": "COMPLETED",

"currency": "USD",

"amount": 449,

"discount": {

"amount": 499

},

"tax": {

"amount": 0,

"percents": 0

},

"customer": {

"country": "US", // ISO 3166-1 alpha-2 format

"payment_type": "card",

"email": "[email protected]",

"ip": "127.0.0.1",

"consent_to_newsletters": true,

"name": "John Doe",

"address": {

"line1": "Wall street",

"line2": "12-b7",

"state": "NY",

"country": "US",

"city": "New York",

"tax_number": ",

"postal_code": "10105",

"phone": "212-487-2939"

}

},

"products": [

{

"id": "61d2ef5352ca3cdc80662cb1",

"key": "uQsm",

"name": "Icon set",

"amount": 299, // cents

"discount": {

"type": "coupon",

"code": "25OFF",

"amount": 25, // cents

"amount_type": "percentage",

"amount_applied": 25, // cents

"currency": "USD"

},

"quantity": 1,

"variant": {

"id": "65782c83586fbb97ce6a8715",

"name": "Outline set",

}

},

{

"id": "61d2ef5352ca3cdc80662cb4",

"key": "QFUm",

"type": "sale",

"name": "Holiday cards",

"amount": 0, // cents

"discount": {

"type": "sale",

"amount": 500, // cents

"amount_type": "fixed",

"amount_applied": 399, // cents

"currency": "USD"

},

"quantity": 1,

"variant": {

"id": "65782c8b586fbb97ce6a8716",

"name": "Small",

}

},

{

"id": "61d2ef5352ca3cdc80662cb7",

"key": "dmnV",

"name": "Awesome serif-font",

"amount": 150, // cents

"discount": {},

"quantity": 1,

"variant": {

"id": "65782c91586fbb97ce6a8717",

"name": "Default",

}

}

],

"date": "2022-01-12T11:57:59+00:00" // ISO 8601 format

}

Email subscribe / unsubscribe

Sample JSON data

{

"customer": {

"email": "[email protected]"

},

"date": "2018-01-17T12:28:00+00:00" // ISO 8601 format

}

Subscription product bought/canceled

{

"id": "61542a2a67cfd83cd57ae4bb", // Unique Subscription ID

"payer_email": "[email protected]",

"plan_name": "Subscription plan name",

"plan_amount": 2000, // cents

"interval": "month", // week | month | year

"product": {

"id": "60e5b823221c469a8daede88",

"key": "QFUm",

"name": "Subscription product name"

},

"activated_at": "2022-05-28T23:17:05+00:00", // ISO 8601 format

"current_period_started_at": "2022-05-28T23:17:05+00:00", // ISO 8601 format

"current_period_ends_at": "2022-06-27T23:17:05+00:00" // ISO 8601 format

}

Cart abandoned

{

"id": "615c388dc14058fdfc5671ec", // Unique Cart ID

"payer_email": "[email protected]",

"total": 968, // cents

"currency": "USD",

"tax": {

"percents": 21,

"amount": 168 // cents

},

"sub_total": 1000, // cents

"last_interaction_at": "2022-05-28T17:17:05+00:00", // ISO 8601 format

"items": [

{

"price": 1000, // cents

"discount": 200, // cents

"total": 800, // cents

"product": {

"id": "60e5b823221c469a8daede88",

"key": "zmsy7q",

"name": "Holiday cards",

"selected_variant": "Default"

},

"sub_total": 1000 // cents

}

]

}

Contact form submitted

{

"email": "[email protected]",

"subject": "Email subject",

"body": "Email body text",

"sent_at": "2022-05-30T10:50:02+00:00" // ISO 8601 format

}

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us