Events and Webhooks: Everything you Need to Know
What are events and webhooks for? Find out how you can use it to get notifications each time that something happens on your account. Read on to learn more.
In today’s video, we’re talking about events and webhooks within SecurionPay.
Let’s start with the events. What are events?
Well, events represent everything that happens. Every single change, if there’s a new charge, whatever it is, it will be represented as an event. Moreover, events allow you to play back step-by-step everything that happened on your account. To start within SecurionPay, we have APIs that are represented either as an event or a list of events.
Here are some of the types that we listed out that represent an event:
- If a charge was successful
- If there was a dispute created
- A chargeback
- If there was a new customer created
- A subscription that was updated
- A plan that’s created
- If there’s a cross sale offer that has been created
The list goes on and on.
Here are some examples of what would be illustrated within your account. You could see that there was some money that was refunded for a charge, there’s the date and the time, there was a charge made, there was a customer that has been added, etc.
This is just an example, but, basically, you get the list and you get the date and the time.
It is also possible to receive event notifications by using webhooks. Webhooks are basically a mechanism that allows you to receive notifications about the events that you’ve created.
When it comes to configuring your webhooks, it’s simply done within the SecurionPay account settings. You have your events created, you have your endpoints, which are the URL that you provide SecurionPay, and then we give you, the merchant, the webhooks, which you have to maintain and process accordingly in order to ensure that there’s proper synchronization throughout the entire period of the webhook configuration.
Fun fact here is speed!
SecurionPay is a market leader when it comes to processing and sending information about the events via webhooks. On average, under a second. The information about the event is sent via our webhooks.
When receiving webhook requests, each time there is an event created and we send it to each corresponding configured webhook URL. The event data it’s encoded as JSON and, in that form or in text, it’s sent off to the merchant accordingly.
SecurionPay sends the merchant information about the events to the corresponding webhook URL. In the example we have successfully returning 200 code and, again, the event happen successfully. However, on the third attempt there is an error, because the return is 400 or another number status code data.
SecurionPay cannot accept any other status code. So, we will keep trying to request the right status code and, if after an adequate period of time nothing happens, SecurionPay, of course, will contact the merchant to try to resolve the issue.
It’s very important to note here that SecurionPay cannot send you additional event information, until the status code is received. Why? Because all events need to be delivered in a chronological order.
SecurionPay + Amazon Web Services
Also, if you’re using Amazon, as we know a lot of our merchants do, then you don’t need to use the HTTP. You can simply integrate your webhook URL with SQS, SNS or Amazon Kinesis.
Thank you so much for watching our video today about events and webhooks, I hope you liked it! Leave us some comments, send us an email, follow us on social media and, most importantly, enjoy the rest of your day!