Skip to main content

Event Callbacks

We'll send a callback to you whenever a significant event, such as a status change, occurs with an order. We consider a callback successful if your system returns an HTTP 200 OK response. If we receive any other response, we will make additional attempts to retry the callback.


Network Requirements

To receive callbacks from Svea, you'll need to configure your network. We require the following:

  • URL Addresses: You must provide us with the callback URLs for both your test and production environments. This is essential for us to add your addresses to our IP whitelist.
  • IP Whitelisting: Your firewall must be configured to allow incoming traffic from Svea's servers. Please whitelist the following IP address ranges:
    • 193.13.207.0/24
    • 193.105.138.0/24

Callback Example

Callbacks are sent as HTTP POST requests with a JSON body. The example below shows a typical callback event:

curl -XPOST \ 
-H "Content-type: application/json" \
-d '{
"orderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"event": "Created",
"issuedAt": "2024-01-01T01:23:45.678Z"
}' \
'https://www.yourdomain.com/callbacks/'

The JSON body transmitted to your callback listener (e.g., https://www.yourdomain.com/callbacks/) contains three key fields:

  • orderId: The unique identifier for the order that triggered the event.
  • event: The name of the event that occurred (e.g., "Created," "Approved," "Completed").
  • issuedAt: A timestamp indicating when the event was generated by the source system.