/v1/webhook
Notifications of status change.
The request is sent when changing the order status.
Supported events:
ORDER_STATUS_UPDATED
- a change in the payment status or delivery statusOPERATION_STATUS_UPDATED
- a change in the status of the operation to confirm, cancel, or refund a payment
Request
POST
https://example.merchant.ru/v1/webhook
Production
POST
https://sandbox.example.merchant.ru/v1/webhook
Sandbox
Body
application/json
{
"event": "TRANSACTION_STATUS_UPDATE",
"eventTime": "2022-12-29T18:02:01Z",
"merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
"operation": {
"externalOperationId": "string",
"operationId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
"operationType": "AUTHORIZE",
"orderId": "string",
"pointsUpdated": false,
"status": "PENDING"
},
"order": {
"deliveryStatus": "NEW",
"orderId": "string",
"paymentStatus": "PENDING"
},
"subscription": {
"customerSubscriptionId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
"nextWriteOff": "2022-12-29T18:02:01Z",
"status": "NEW",
"subscriptionPlanId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b"
}
}
Name |
Description |
event* |
Type: string Enum: |
eventTime* |
Type: string<date-time> Event time in the format |
merchantId* |
Type: string<uuid> |
operation |
Type: OperationWebhookData |
order |
Type: OrderWebhookData if event == ORDER_STATUS_UPDATED |
subscription |
Type: SubscriptionWebhookData Subscription status. Transmitted if event == SUBSCRIPTION_STATUS_UPDATED. |
OperationWebhookData
Name |
Description |
operationId* |
Type: string<uuid> |
operationType* |
Type: string Enum: |
orderId* |
Type: string |
status* |
Type: string Enum: |
externalOperationId |
Type: string |
pointsUpdated |
Type: boolean Shows whether Plus points have been updated. If yes, sync the cart. |
OrderWebhookData
Name |
Description |
orderId* |
Type: string Order ID received in the /order/create response |
deliveryStatus |
Type: string Delivery statuses Enum: |
paymentStatus |
Type: string Order status Enum: |
SubscriptionWebhookData
Name |
Description |
customerSubscriptionId* |
Type: string<uuid> Subscription ID. The SDK returns it when the subscription is created successfully. You can also save a subscription when you get the first notification on it. The same value will arrive in this field every time the subscription is updated. |
status* |
Type: string Subscription type Enum: |
subscriptionPlanId* |
Type: string<uuid> ID of the subscription plan created in the dashboard or over the API. |
nextWriteOff |
Type: string<date-time> Date of the next attempt to debit a subscription fee |
Responses
200 OK
success
Body
application/json
{
"status": "success"
}
Name |
Description |
status |
Type: string Default: |
400 Bad Request
bad request
Body
application/json
{
"reason": "string",
"reasonCode": "FORBIDDEN",
"status": "fail"
}
Name |
Description |
reasonCode* |
Type: string Enum: |
reason |
Type: string |
status |
Type: string Default: |
No longer supported, please use an alternative and newer version.