Skip to main content

Webhooks for orders

These webhooks are related to the order creation and order management flows.

Events​

walley:order:created​

This webhook is triggered whenever an order is created. This can happen because a customer completed a checkout session, or because an authorization using the tokenized flow was successful, or an AddInvoice was done in the Payment API.

{
"Type": "walley:order:created",
"Timestamp": "2024-01-30T11:02:42.5997621+01:00",
"Payload": {
"OrderId": "45e0832b-0b32-43e4-99b2-b10700a58a04",
"Amount": 30,
"Currency": "SEK",
"Status": "Authorized",
"AuthorizationId": "c31e9218-6a19-4b2f-8992-affc9dca1c41",
"CustomerToken": "0a96881b-295a-4154-a867-865fc912619c"
}
}

The Status property can have the different states

  • OnHold
  • Authorized
  • Captured
  • RequiresSigning
  • RequiresIdentityCheck

walley:order:reauthorized​

This webhook is triggred whenever items are changed on an order. This can happen because a call has been made to the reauthorize API, or items have been edited in the Merchant Hub, or a ReplaceInvoice was done in the Payment API.

{
"Type": "walley:order:reauthorized",
"Timestamp": "2024-01-30T11:02:42.5997621+01:00",
"Payload": {
"OrderId": "45e0832b-0b32-43e4-99b2-b10700a58a04",
"Amount": 10,
"OriginalAmount": 20
"Currency": "SEK"
}
}

This will only effect uncaptured amount left on an order.

walley:order:extended​

This webhook is triggred whenever an expired order is authorized again. This can happen because an order is extended in the Merchant Hub.

{
"Type": "walley:order:extended",
"Timestamp": "2024-01-30T11:02:42.5997621+01:00",
"Payload": {
"OrderId": "45e0832b-0b32-43e4-99b2-b10700a58a04",
"Amount": 10,
"Currency": "SEK"
}
}

The Amount property is equal to the previously expired amount on the order.

walley:order:captured​

This webhook is triggered whenever an capture is made on an order. This can happen because a call has been made to the capture API, or a capture is made in the Merchant Hub, or a PartActivateInvoice/ActivateInvoice was done in the Payment API.

{
"Type": "walley:order:captured",
"Timestamp": "2024-01-30T11:02:42.5997621+01:00",
"Payload": {
"OrderId": "45e0832b-0b32-43e4-99b2-b10700a58a04",
"CaptureId": "147819779",
"Amount": 10,
"AmountLeftToCapture": 20,
"Currency": "SEK"
}
}

walley:order:canceled​

This webhook is triggered whenever an order is cancled. This can happen because a call has been made to the cancel API, or an order is canceled in the Merchant Hub, or a CancelInvoice was done in the Payment API.

{
"Type": "walley:order:canceled",
"Timestamp": "2024-01-30T11:02:42.5997621+01:00",
"Payload": {
"OrderId": "45e0832b-0b32-43e4-99b2-b10700a58a04",
"Amount": 10,
"Currency": "SEK"
}
}

The Amount property is equal to the uncaptured amount left on the order when it was canceled.

walley:order:expired​

This webhook is triggred when the expiresAt date on the order has past. This only occures if the order has uncaptured amount left when the expiresAt date past.

{
"Type": "walley:order:expired",
"Timestamp": "2024-01-30T11:02:42.5997621+01:00",
"Payload": {
"OrderId": "45e0832b-0b32-43e4-99b2-b10700a58a04",
"Amount": 10,
"Currency": "SEK"
}
}

The Amount property is equal to the uncaptured amount left on the order.

walley:order:rejected​

This webhook is triggered if an order is rejected by Walley. This can only occur on orders created with status OnHold

{
"Type": "walley:order:canceled",
"Timestamp": "2024-01-30T11:02:42.5997621+01:00",
"Payload": {
"OrderId": "45e0832b-0b32-43e4-99b2-b10700a58a04",
"Amount": 10,
"Currency": "SEK"
}
}