Webhook Notification - Transaction Failed
Example webhook notification sent by SQRIL when a transaction is finalized as failed.
When it is sent:
-
After inbound processing marks the transaction failed.
-
Sent to all active webhook configs whose event filter matches
transaction.failed.
Payload notes:
-
Required fields:
tx_id,status(FAILED). -
Optional fields:
error_message,sender,recipient, and fee fields (if present). -
error_messagedescribes why the transaction failed.
Headers:
-
Content-Type: application/json -
User-Agent: SQRIL-Webhook/ -
X-SQRIL-Signatureonly when a webhook secret is configured.
Verifying X-SQRIL-Signature:
Use the exact raw HTTP body (do not re-serialize JSON). Encoding is base64, not hex. See the Account Webhook Notifications folder description for a Node.js verification example.
Authentication
Basic Auth: base64(client_id:client_secret)
Headers
base64(HMAC-SHA256(webhook_secret, exact_raw_request_body)). Included only when webhook secret is configured. Verify against the raw body; do not re-serialize JSON.
