Setup
Register in the Console
Go to Prism Console → Settings → Webhooks
→ Add Endpoint. Enter your URL and select the events you want to
receive.
Copy the signing secret
The Console generates a signing secret for your endpoint. Copy it — you’ll
need it to verify webhook signatures.
Verify signatures
Always verify the
X-Prism-Signature header before processing events. See
Signature Verification below.Example Endpoint
Event Types
| Event | Description | Triggered When |
|---|---|---|
payment.pending | Payment submitted, awaiting confirmation | After agent submits payment on-chain |
payment.completed | Payment verified and settled | After on-chain confirmation by Spectrum |
payment.failed | Payment verification failed | Invalid transaction, wrong amount, or expired |
settlement.completed | Funds settled to merchant wallet | After Spectrum settlement completes |
Payload Format
All webhook payloads follow the same structure:| Field | Description |
|---|---|
id | Unique event identifier |
type | Event type (see table above) |
created | ISO 8601 timestamp |
data.payment_id | Prism payment/charge identifier |
data.amount | Amount in token base units |
data.token | Token symbol (FDUSD, USDC) |
data.chain | Chain where settlement occurred |
data.from | Agent wallet address |
data.to | Merchant wallet address |
data.tx_hash | On-chain transaction hash |
data.endpoint | The merchant endpoint that triggered the charge |
data.status | Payment status |
Signature Verification
All webhooks include anX-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.
- TypeScript
- Python
Retry Policy
If your endpoint returns a non-2xx response, times out, or is unreachable, Prism retries delivery with exponential backoff:| Attempt | Delay After Failure |
|---|---|
| 1 | Immediate |
| 2 | 5 minutes |
| 3 | 30 minutes |
| 4 | 2 hours |
| 5 | 24 hours |
- 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
idto 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