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 a particular events connected to your store.

How do I set up a 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 request with JSON data to user provided URL in 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 newsletter list
Email unsubscribe Occurs whenever a customer is unsubscribed from all emails

New Order event

Sample JSON data

{
  "id": "dmnVQFUm",
  "status": "COMPLETED",
  "customer": {
    "ip": "85.169.155.202",
    "country": "US",
    "payment_type": "paypal",
    "email": "[email protected]"
  },
  "currency": "USD",
  "tax": {
    "amount": 105,
    "percents": 21
  },
  "discount": {
    "amount": 200
  },
  "amount": 605,
  "products": [
    {
      "key": "QFUm",
      "amount": 505,
      "quantity": 1
    },
    {
      "key": "dmnV",
      "amount": 100,
      "quantity": 1
    }
  ],
  "date": "2018-01-17T12:28:00+00:00"
}

Field description

Key Description
id Unique transaction ID
status Payment status. One of the following:
  • COMPLETED
  • COMPLETED_FUNDS_HELD
  • PARTIALLY_REFUNDED
  • CANCELED_REVERSAL
  • DENIED
  • FAILED
  • REFUNDED
  • REVERSED
customer Object that contains information about the customer
 customer.ip IP address
 customer.country ISO 3166-1 alpha-2 format
   customer.payment_type Payment gateway used to perform this transaction. One of the following:
  • paypal
  • stripe
  • free
 customer.email Email address
currency ISO 4217 format
tax Object that contains information about the tax (if applied)
 tax.amount In cents - total amount of tax applied to purchase
 tax.percents Tax percents (0-100) that was applied to purchase
discount Object that contains information about the discount (if applied)
 discount.amount In cents - total amount of discount applied to purchase
amount In cents - total amount charged from the buyer
date ISO 8601 format
products Array of products purchased
 products.key Unique product key
 products.amount In cents - total amount charged for current product
 products.quantity Number of items sold

Email subscribe / unsubscribe

Sample JSON data

{
  "customer": {
    "email": "[email protected]"
  },
  "date": "2018-01-17T12:28:00+00:00"
}

Field description

Key Description
customer Object that contains information about the customer
 customer.email Email address
date 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