Webhooks
Real-time notifications
Overview
CrissCross uses webhooks to notify your application about events that occur within your payment processing. These notifications are delivered via HTTP POST requests to your specified endpoint, allowing you to automate workflows and keep your systems synchronized with payment activities.
Event Types
CrissCross sends different types of webhook events for both transactions (payments in) and payouts (payments out).
Transaction event types:
Payout event types:
Transaction and payout webhooks share the same
payloadschema — it’s the same object returned by the Retrieve Payment Status endpoint. Whatever fields you see when polling for status, you’ll get the same fields in the webhook. ThebatchPayoutIdfield will additionally be present if the payout is part of a batch.
Payload Fields
The payload field is identical to the response body of the Retrieve Payment Status endpoint, so you can reuse the same parser for both. For convenience, the fields are:
Example Webhook Payloads
Here’s an example of a completed transaction:
Here’s an example of a completed payout:
Getting Started with Webhooks
To integrate webhooks into your application, follow these steps:
- Create a webhook subscription - Configure the HTTPS URL where you want to receive notifications
- Implement signature verification - Verify webhook authenticity using the provided secret
- Process webhooks idempotently - Handle webhook events while avoiding duplicate processing
- Acknowledge receipt - Return HTTP 200 response for successful webhook receipt
Creating a Webhook Subscription
You can create and configure your webhook subscriptions from the webhooks section of your CrissCross dashboard.
- Open the webhooks dashboard
- Click “Add Endpoint”
- Enter your HTTPS endpoint URL
- Select the events you want to subscribe to
- Save your webhook configuration
If you don’t see the webhooks section in your dashboard, contact your CrissCross account manager.
Securing Webhooks
Every webhook delivered by CrissCross includes a signature header that you should verify before processing the event. Signatures are HMAC-SHA256 over the message ID, timestamp, and raw payload.
The example below uses the open-source svix npm package, which implements the same signature scheme. If you’d rather not pull in a dependency, see Manual Webhook Verification further down for a hand-rolled equivalent.
Manual Webhook Verification
If you’d prefer not to use the svix library, you can verify webhook signatures manually with any HMAC-SHA256 implementation. Here’s how it works:
1. Required Headers
Each webhook includes three critical headers:
svix-id: Unique identifier for the webhook messagesvix-timestamp: Timestamp in seconds since epochsvix-signature: Base64 encoded list of signatures (space delimited)
2. Constructing the Signed Content
Concatenate the ID, timestamp, and payload with periods:
⚠️ Important: Use the raw request body. Any modification (even whitespace) will invalidate the signature.
3. Calculating the Signature
Use HMAC-SHA256 to verify the signature:
4. Timestamp Verification
Always verify the timestamp to prevent replay attacks:
Example Implementation
Here’s a complete example combining all verification steps:
🔒 Security Note: Always use constant-time string comparison when comparing signatures to prevent timing attacks.
Best Practices
-
Verify Signatures
- Always verify webhook signatures using your webhook secret
- Reject requests with invalid signatures
-
Handle Events Idempotently
- Store processed webhook IDs to prevent duplicate processing
- Use event IDs for deduplication
-
Implement Proper Error Handling
- Return 2xx status codes for successful receipt
- Return 4xx for invalid requests
- Return 5xx for processing errors
-
Monitor Webhook Health
- Track failed deliveries in the CrissCross dashboard
- Set up alerts for repeated failures
Testing Webhooks
For development and testing:
- Use the webhooks dashboard to view delivery history and inspect individual attempts
- Test signature verification with sample payloads
- Use the Resend action on any past message to redeliver it to your endpoint while iterating
- If you don’t have an endpoint ready yet, Svix Play gives you a temporary public URL that captures incoming webhooks so you can inspect them in the browser
Webhook Retries
If your endpoint returns a non-2xx response code or is unreachable, CrissCross automatically retries delivery on an exponential backoff schedule. Each delay is measured from the failure of the previous attempt:
After all retries are exhausted (roughly 28 hours after the initial attempt), the message is marked as Failed and no further automatic delivery attempts will be made. You can still recover it manually — see Resending and Replaying Webhooks.
A successful delivery at any point ends the retry sequence. A 2xx response from your endpoint is treated as success; anything else (including 3xx redirects and timeouts) counts as a failure.
Delivery Failure Notifications
CrissCross emits two additional notifications you can subscribe to in order to monitor the health of your webhook integration:
These are configured the same way as your other event subscriptions from the webhooks dashboard.
Endpoint Auto-Disabling
If an endpoint experiences sustained delivery failures, CrissCross will automatically disable it to avoid sending traffic to a known-broken receiver. The criteria are:
- All delivery attempts to the endpoint have failed for at least 5 consecutive days, and
- Multiple deliveries failed within a 24-hour span, with at least 12 hours between the first and last failure (this prevents brief outages from triggering disablement).
When this happens, an endpoint.disabled notification is sent. Re-enable the endpoint from the webhooks dashboard once the underlying issue is resolved. Use recover or replay-missing to backfill any messages that were not delivered while the endpoint was disabled.
Resending and Replaying Webhooks
CrissCross supports four manual recovery operations from the webhooks dashboard, covering anything from a one-off resend to backfilling an endpoint that was down for hours.
How to run a recovery
- Open the webhooks dashboard and select the endpoint you want to recover.
- For a single message, find the message in the delivery log and click Resend.
- For the bulk operations, open the endpoint’s actions menu, choose Recover or Replay, and pick the start timestamp. The dashboard will show progress and a count of messages re-queued.
Because these operations can deliver the same eventId more than once, handlers must be idempotent — see the idempotency guidance and deduplicate on eventId.
ℹ️ If you need to recover messages older than the retention window, contact your CrissCross account manager.
IP Allowlisting
If your infrastructure requires IP allowlisting for incoming webhook traffic, contact your CrissCross account manager for the current list of source IP ranges. The list is updated periodically, so we recommend confirming it before any allowlist change is rolled out to production.
Webhook Security Checklist
✅ Use HTTPS endpoints only
✅ Verify webhook signatures
✅ Store webhook secrets securely
✅ Process events idempotently
✅ Monitor failed deliveries
✅ Implement proper error handling