Webhooks Introduction
π Webhooks
Webhooks provide a powerful way for your application to receive real-time updates from the PayNow API. Instead of polling for changes, you can subscribe to specific events, and PayNow will send a POST request to your server when those events occur.
βοΈ How Webhooks Work
When you subscribe to a webhook event:
You provide a URL endpoint.
PayNow sends a
POST
request to that URL whenever the subscribed event occurs.The request body contains relevant event data.
Your server processes this data and returns an appropriate HTTP status.
π Setting Up Webhooks
You can configure webhook subscriptions in two ways:
Via the Dashboard Use the built-in user interface to manage subscriptions.
Via the API Programmatically register webhook endpoints with desired settings.
Required Setup Details
event
The event you want to subscribe to
url
The full URL where the POST request should be sent
type
Payload format (see Webhook Types below)
π¦ Webhook Types
Currently, PayNow supports the following two webhook types:
JSON (v1)
JSON
Sends a structured JSON payload. Fully documented under Webhook Integration
Discord (v1)
Discord Embed
Sends a Discord-friendly embed. Simply plug in a Discord webhook URL and customize the message using templates
β οΈ Only the JSON v1 webhook is covered in the Webhook Integration documentation. The Discord webhook works by copying your Discord webhook URL into PayNow and setting your event and message template.
π£ Event Types
PayNow supports various event types that can trigger a webhook. For the full list of supported events, refer to the Webhook Events documentation.
π¬ Handling Webhook Notifications
When your server receives a webhook:
It should return a
2xx
status code if the event was received and processed successfully.If your server responds with a non-successful status code (
>299
), PayNow will retry automatically.
Retry Behavior
Retries use exponential backoff, meaning delays will increase between attempts.
Delivery attempts will continue for a reasonable period before being marked as failed.
π Further Reading
Webhook Integration β Detailed setup and payload structure
Webhook Events β Complete list of supported webhook triggers
Last updated
Was this helpful?