Pay Ops cookbook
Use these recipes to get started with Pay Ops features and functions. See Pay Ops overview for more.
New to the API? Start with the authentication guide on the cookbooks home.
Recipe: Subscribe to webhooks
/// OverviewRegister a webhook so Payabli notifies your server in real time when an event occurs. This recipe creates a single subscription for one event type.
/// Prerequisites
Before you start, make sure you have the following:
- A publicly accessible URL that accepts POST requests. Supported ports are 80, 443, 8080, and 4443. For local development, see the webhook quickstart for tunneling setup.
- An
eventTypeto subscribe to. See the webhook payloads reference for all available events. - The
ownerIdof the paypoint or organization that owns the notification, plus its matchingownerType:0for organization or2for paypoint.
/// Step 1: Create the webhook subscription
Register the webhook with Payabli. Set method to web and target to your server’s public URL.
Send a POST request to /api/Notification.
The response returns the notificationId in responseData. Save this — you need it to update or delete the subscription later.
See Create notification for the full API reference.
/// What’s next
You’re now subscribed. Trigger the event to see a payload land on your server. Learn more about webhook payloads and managing notifications.