Quick Start
3 min
Prerequisites
Before registering webhooks, you need:
- A Jetpay API authentication token (company token-based access)
- A publicly accessible HTTPS endpoint to receive webhook events
- Ability to respond to webhook requests within 15 seconds with a 2xx HTTP status code
Quick Start: Register Your First Webhook
You can view our detailed schema for all webhook related API requests here.
To register a webhook endpoint, make a POST request to the webhooks API:
Endpoint: POST /webhooks/
Minimum Required Parameters:
- callback_url: Your publicly accessible HTTPS endpoint
The API will return a webhook configuration including a unique identifier that you'll use for management operations.
Basic Webhook Handler Requirements
Your webhook endpoint should:
- Respond Quickly: Return a 2xx HTTP status code within 15 seconds
- Accept JSON: Expect Content-Type: application/json requests
- Verify JWT: Validate the JWT token in the Authorization header (Optional, but highly recommended)
- Handle Batches: Process arrays of events (1 to max_batch_size events per request)
- Be Idempotent: Handle duplicate event deliveries gracefully
Testing Your Endpoint
Before going live, ensure your endpoint:
- Is publicly accessible via HTTPS
- Returns 2xx status codes for valid requests
- Handles the expected event payload structure
- Processes events asynchronously if needed (respond quickly, process later)