Skip to main content
Webhooks deliver real-time notifications about payment events. Prism POSTs a signed JSON payload to your configured endpoint whenever a payment is completed, fails, or settles. Use webhooks to update order status, trigger fulfillment, log transactions, or sync with your backend.

Setup

1

Create an endpoint

Add an HTTP POST endpoint to your application that accepts JSON payloads.
2

Register in the Console

Go to Prism ConsoleSettings → WebhooksAdd Endpoint. Enter your URL and select the events you want to receive.
3

Copy the signing secret

The Console generates a signing secret for your endpoint. Copy it — you’ll need it to verify webhook signatures.
4

Verify signatures

Always verify the X-Prism-Signature header before processing events. See Signature Verification below.

Example Endpoint

Event Types

Payload Format

All webhook payloads follow the same structure:

Signature Verification

All webhooks include an X-Prism-Signature header containing an HMAC-SHA256 signature of the raw request body, using your webhook signing secret as the key. Always verify signatures before processing events. This prevents spoofed requests from triggering actions in your application.
Use constant-time comparison (timingSafeEqual / hmac.compare_digest) to prevent timing attacks. Do not use === or == for signature comparison.

Retry Policy

If your endpoint returns a non-2xx response, times out, or is unreachable, Prism retries delivery with exponential backoff: After 5 failed attempts, the event is marked as failed in the Console. You can view delivery logs and manually retry from Settings → Webhooks → Delivery Log. Best practices:
  • Respond with 200 as quickly as possible — do heavy processing asynchronously
  • Use a queue (SQS, Redis, etc.) for webhook processing in high-volume scenarios
  • Implement idempotency using the event id to handle duplicate deliveries

Testing Webhooks

  • Console test button — Send a test event from the Prism Console to verify your endpoint is reachable and responding correctly
  • Local development — Use a tunneling tool like ngrok to expose your local endpoint for testing
  • Small amount testing — Use production with small amounts to verify your full webhook pipeline end-to-end
Last modified on April 2, 2026