Overview
- Delivery: HTTP POST requests to your configured endpoint
- Retry Logic: Up to 3 attempts with exponential backoff (see Retry Behavior)
- Request Timeout: 10 seconds per attempt
- Supported Events: Prescription lifecycle events
Prerequisite: each organization must first call
GET /v1/organizations/{organization_id}/validate. Until /validate succeeds for an organization, no webhooks are sent for it.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
How to Activate Webhooks
1
Validate the organization
Call
GET /v1/organizations/{organization_id}/validate once per organization you connect. This is a prerequisite — it flags the organization as integrated with your platform, and Parchment only emits webhooks for organizations that have been validated.2
Provide your webhook endpoint
Contact Parchment support at hello@parchment.health with:
- Your webhook endpoint URL (must be HTTPS)
- Your partner ID
3
Receive your webhook secret
Parchment registers your endpoint and provides a confirmation with your webhook secret. This secret is shown only once — store it securely.
4
Implement your webhook handler
Build an endpoint that verifies the signature and routes events by type. Here’s a complete Node.js example:See Webhook Signature Verification for Python examples and more details.
5
Test your integration
Once deployed, verify that:
- Your endpoint returns a
2xxstatus code - Signature verification passes
- Events are routed correctly
Webhook Endpoint Requirements
Your webhook endpoint must:- Use HTTPS with a valid SSL certificate
- Return a
2xxresponse within 10 seconds — process events asynchronously if needed - Handle retries idempotently — use the
event_idto prevent duplicate processing
Request Headers
Every webhook request includes the following headers:Retry Behavior
Parchment automatically retries failed webhook deliveries using exponential backoff.Retry Schedule
Each event is attempted up to 3 times. A request is considered failed if it does not return a2xx status code within the 10-second timeout, or if a network error occurs.
After the 3rd attempt fails, the event is not retried further and is logged as permanently failed on Parchment’s side.
Retryable vs. Non-Retryable Responses
Parchment distinguishes between transient and permanent failures to avoid pointless retries: Retryable (will retry up to the limit):- Network errors (connection refused, DNS failure, TLS errors)
- Request timeouts (no response within 10 seconds)
408 Request Timeout429 Too Many Requests- Any
5xxserver error
- Any other
4xxclient error (e.g.400,401,403,404)
A
4xx response (other than 408 / 429) signals a problem with your endpoint configuration — bad signature handling, wrong auth, missing route — that retrying won’t fix. Fix the endpoint and contact Parchment support if you need the event re-sent.When Retries Stop
Parchment stops retrying a webhook event as soon as any one of the following occurs:- Successful delivery — your endpoint returns a
2xxstatus code. - Non-retryable response — your endpoint returns a
4xxother than408or429. The event fails immediately with no further attempts. - Retry budget exhausted — all 3 attempts have failed with retryable errors.
Idempotency
Because retries can occasionally result in duplicate deliveries (e.g. if your endpoint returned a non-2xx status but still processed the event), your handler must be idempotent. Use the top-levelevent.id field from the payload as an idempotency key and skip any event ID you have already processed.
Rate Limiting
If your endpoint needs to throttle Parchment, return429 Too Many Requests. Parchment will back off and retry according to the schedule above.
Event Types
Parchment sends webhooks for these event types:
See Webhook Events for detailed payload examples.

