Sending webhook data to your custom plugin

I’m trying to set up s2Member Pro to listen to gateway webhooks and send the necessary data to a custom plugin. I’m going to my WordPress dashboard and navigate to s2Member -> API / Notifications -> (within there should be a Webhook / Notification URLs, I do not see it). There is no Webhook tab, where can i find this webhook tab,

There is no “webhook tab” in the s2member admin GUI.

These two articles should help you build what you need tho.

Building an API Notification Handler (i.e., a Webhook) Using an MU Plugin file in WordPress

Hacking s2Member w/ Hooks/Filters

https://s2member.com/kb-article/hacking-s2member-plugin-w-hooksfilters-for-wordpress/

1 Like

Hi Earl,

As I mentioned my email reply, and as Gerard said correctly, there isn’t a webhooks tab, but you can enter your URL in the notifications you want to use (e.g. Payments). WP Admin > s2Member > API / Notifications

Screenshot%202023-04-05%20at%2001-28-08%20s2Member%20API%20_%20Notifications%20%E2%80%B9%20s2Member%20Membership%20Plugin%20for%20WordPress%20%E2%80%94%20WordPress

The URL could be of a custom script you created, e.g. https://s2member.com/kb-article/building-an-api-notification-handler-webhook/

You mention a custom plugin, so that would have a URL that can get values to do something with them. That URL is what you’d enter in the notification, and you’d use the notification replacement codes to add the values in the URL.

Screenshot%202023-04-07%20at%2000-09-37%20s2Member%20API%20_%20Notifications%20%E2%80%B9%20s2Member%20Membership%20Plugin%20for%20WordPress%20%E2%80%94%20WordPress

:slight_smile: