Webhooks 🔌

Overview

Webhooks are HTTP callbacks that deliver notification messages for events. Peach Payments uses webhooks to inform merchant systems when certain events occur. This way, your servers are always up to date with transaction information.

📘

In certain circumstances, Peach Payments could update a checkout status using webhooks after a checkout session ends. For example, system issues might result in a checkout status being incorrect during the session; when the session ends and the system recovers, Peach Payments sends a webhook with the updated status.

Transaction statuses can change as follows:

  • Created -> Pending
  • Pending -> Successful, cancelled, or uncertain
  • Uncertain or cancelled -> Successful

Peach Payments cannot guarantee the order of webhooks. For example, if your customer initiates a transaction and Peach Payments sends a pending webhook but you have a system issue that causes the webhook to go into exponential backoff, Peach Payments might send the next webhook before the pending webhook gets retried. The webhook payload contains a timestamp that you can use to identify the correct order of webhooks.

Configure a webhook

The following instructions describe how to add or delete a webhook for Checkout, Ecwid, Magento, Shopify, Wix (for Dashboard only, not sandbox), and WooCommerce.

📘

Only certain roles can add or delete webhooks.

To configure webhooks for other products, see the following documentation:

Add a webhook

Follow these steps to add a webhook:

  1. Log in to your Peach Payments Dashboard.
  2. If you're adding a Checkout webhook, in the left navigation menu, click Checkout. If you're adding a payment extension webhook, in the Connect section, click your payment extension, for example, WooCommerce.
  3. In the Webhooks section, click Add webhook URL.
  4. In the Adding webhook URL window that appears, enter your webhook URL, ensuring that your system responds with a 200 status response and that you have enabled HTTPS in your live environment. Peach Payments sends two webhooks to this URL, the first without data (curl -v -X POST https://www.mysite.co.za/pp-hosted/secure/webhook) and the second with JSON data (curl -v -H "Content-Type: application/json" -X POST -d '{"test":true}' https://www.mysite.co.za/pp-hosted/secure/webhook) if the initial attempt fails. If both attempts fail to return a 200 status, Peach Payments considers the validation unsuccessful.

The webhook URL appears in the Webhooks section.

Delete a webhook

Follow these steps to delete a webhook:

  1. Log in to your Peach Payments Dashboard.
  2. If you're deleting a Checkout webhook, in the left navigation menu, click Checkout. If you're deleting a payment extension webhook, in the Connect section, click your payment extension, for example, WooCommerce.
  3. In the Webhooks section, click the more options icon next to the webhook that you want to delete, then click Delete.
  4. In the confirmation window, click Delete.

Peach Payments deletes the webhook.

Allowlist webhook IPs

Peach Payments sends webhooks from a range of IPs.

If you use IP allowlisting for webhooks, ensure that your allowlist includes the following IPs to ensure that Peach Payments can send you webhooks:

54.217.71.82
185.147.172.128/25
185.147.174.128/25
18.202.83.149
18.200.34.16
34.251.199.9
52.214.127.216
34.249.103.193
52.209.186.130
52.212.210.254
13.244.50.188
13.244.230.122
13.244.251.120
13.245.98.50
13.245.120.20
13.245.217.30
13.246.79.86
13.246.150.184
13.246.160.250
13.246.163.222
13.246.168.17
13.246.246.124
13.247.25.243
13.247.51.135
13.247.124.50
13.247.141.75
3.251.34.141
34.240.144.125
34.248.111.246
34.249.109.210
34.250.77.175
34.255.55.159
46.137.175.38
52.16.197.2
52.18.18.9
52.210.220.102
52.211.146.143
54.78.96.194
54.78.242.96
54.155.192.215
54.170.93.5
54.228.176.63
54.246.240.146
63.34.32.153
108.128.146.246
54.77.194.29
52.210.217.138
54.194.136.184
185.147.172.64/26
54.155.67.122
18.202.83.149
52.18.99.104
34.249.176.69
34.240.186.230
52.31.92.63
13.244.58.11
13.244.145.127
13.245.178.88
13.245.189.82
13.245.191.238
13.246.124.64
13.246.161.159
13.246.166.156
13.246.182.159
13.246.209.51
13.246.211.141
13.246.215.238
13.247.22.26
13.247.28.220
13.247.39.45
13.247.102.84
18.200.49.241
18.202.82.161
34.241.61.38
34.243.190.192
34.251.163.163
52.17.112.111
52.48.173.106
52.49.77.175
52.51.240.85
54.72.91.107
54.73.123.156
54.76.112.125
54.76.143.97
52.210.65.210
52.211.203.29
52.214.96.65
63.32.51.254
79.125.66.112
108.128.216.153
18.202.14.128
34.247.146.84
52.19.47.86

Download IP address lists

You can download the IP address lists in different formats for import into iptables or similar tools: