Webhooks
This tutorial teaches you how to use our webhooks
Yordex uses webhooks to notify you of changes. Please contact us to set up your webhook endpoints.
You can receive webhooks for the following changes:
For every new card payment we create an order so to listen for new card payments you need to listen for new orders .
The webhook will only tell you that an event occurred. To get the details, you should get the order itself
New order created
When a new order is created, the following webhook will be sent:
{
"type":"NEW_ORDER",
"orderId" : "order-id",
"orderStatus" : "NOT_APPROVED"
}
Verify webhookKey in Authorization header
We will provide a unique webhook key in the 'Authorization' header of every webhook. Please verify that key to make sure the webhook indeed came from us.
Order state change
When an order changes state, the following webhook will be sent:
{
"type":"ORDER_STATUS_CHANGED",
"orderId" : "order-id",
"orderStatus" : "APPROVED",
"previousOrderStatus" : "NOT_APPROVED",
}
As for the new order webhook, we will provide a webhookKey in the Authorization header. Please verify this key to make sure the webhook indeed came from us.
Event state change
When an event changes state, the following webhook will be sent:
{
"type":"EVENT_STATUS_CHANGED",
"orderId" : "order-id",
"orderStatus" : "APPROVED",
"eventId" : "event-id",
"eventName" : "Order approved",
"paymentName" : "Deposit",
"eventStatus" : "PAYMENT_DUE",
"previousEventStatus" : "NOT_STARTED"
}
As for other webhooks, we will provide a webhookKey in the Authorization header. Please verify this key to make sure the webhook indeed came from us.
Updated about 1 year ago