Configure your webhook endpoint

Configure a webhook to receive updates about orders.

MultiSafepay uses a webhook to send updates about orders and other notifications to your web server.

You can configure the webhook at site level or at order level.

How it works

The webhook is triggered when the order status or transaction status changes, e.g. when:

  • A customer completes payment
  • A customer's payment is declined or fails
  • An order has shipped
  • A refund is processed

MultiSafepay uses HTTPS to send notifications securely to the webhook endpoint configured for your web server.

Our webhook uses the POST method to inform your web server when there is an update, and shares details on what has changed. This is more efficient than a poll-based GET method where your web server must continually check for updates. We do support GET as a notification_method, but we strongly recommend POST because it's more efficient.

Webhook communication flowWebhook communication flow

Note

International bank account numbers (IBANs) are sensitive data. For security reasons, we mask them by default in POST webhook notifications so that only the last 4 digits are visible, e.g. *** 1234.

To unmask IBANs, see IBANs.

Prerequisites

You must set a webhook endpoint, which is a URL that:

  • Doesn't include port numbers.
  • Is publicly accessible, or has MultiSafepay on your allow list.
  • Uses HTTPS - We don't accept HTTP for security reasons.

For a list of MultiSafepay IP addresses, email [email protected]

Configuration

You can configure the webhook endpoint at:

Site level
  1. Sign in to your MultiSafepay account.
  2. Go to Settings > Website settings.
  3. Select the relevant site.
  4. In the Notification URL field, set your webhook endpoint.
Order level
  1. Create an order via our API.
  2. In the request body, set:
    • payment_options.notification_url to your webhook endpoint
    • payment_options.notification_method to POST

Note

If you configure your webhook endpoint at site and order level, the order level endpoint is used by default.

Example

curl -X POST \
"https://api.multisafepay.com/v1/json/orders?api_key={your-api-key}"
-d '{
  "type": "redirect",
  "order_id": "my-order-id-1",
  "currency": "EUR",
  "amount": 1000,
  "description": "product description",
  "payment_options": {
      "notification_url": "https://www.example.com/paymentnotification",
      "notification_method": "POST"
  }
}'

Success!

Now that you have configured your webhook endpoint, you need to configure your web server to handle notifications correctly.



💬

Support

Email [email protected]

Top of page


What’s Next

Handle notifications

Did this page help you?