Overview
- Delivery: HTTP POST requests to your configured endpoint
- Retry Logic: Automatic retries with exponential backoff
- Supported Events: Prescription lifecycle events (created)
How Webhooks Work
- An event occurs in Parchment (e.g., a prescription is created)
- Parchment sends an HTTPS POST request to your webhook endpoint
- Your application processes the event
- Your endpoint returns a 2xx status code to confirm receipt
Configuration
Provide Your Webhook Endpoint
Contact Parchment support at [email protected] with:- Your webhook endpoint URL (must be HTTPS)
- Your partner ID
Webhook Endpoint Requirements
Your webhook endpoint must:1. Use HTTPS
All webhook URLs must use HTTPS with a valid SSL certificate.2. Return Success Quickly
Respond with a2xx status code within 10 seconds. Process events asynchronously if needed.
3. Handle Retries Idempotently
Parchment may send the same event multiple times. Use theevent_id to prevent duplicate processing.
Webhook Delivery
Headers
Every webhook request includes these headers:| Header | Description | Example |
|---|---|---|
Content-Type | Always application/json | application/json |
User-Agent | Parchment webhook identifier | Parchment-Webhooks/1.0 |
Retry Behavior
If your endpoint doesn’t respond with a2xx status code:
- Retries: Up to 3 attempts
- Backoff: Exponential (1s, 2s, 4s)
- Non-retryable errors: 4xx errors (except 408, 429)
- Timeout: 10 seconds per attempt
Success Criteria
A webhook is considered successfully delivered when your endpoint:- Responds with a
2xxstatus code (200-299) - Within 10 seconds
Event Types
Parchment sends webhooks for these event types:| Event Type | Description | Status |
|---|---|---|
prescription.created | A new prescription was created | Live |
prescription.updated | A prescription was modified | Coming Soon |
prescription.cancelled | A prescription was cancelled | Coming Soon |
prescription.dispensed | A prescription was dispensed | Coming Soon |
prescription.expired | A prescription expired | Coming Soon |

