Skip to main content

Webhooks

Webhooks allow your application to receive real-time notifications when specific events occur in the M.O.N.K.Y ecosystem. Instead of continuously polling our API, webhooks push data to your endpoints as events happen.

Overview

M.O.N.K.Y webhooks are HTTP callbacks that we send to your specified endpoints when triggered events occur. This enables you to:
  • Get instant notifications about transaction confirmations
  • Receive real-time balance updates
  • Monitor staking reward distributions
  • Track price movements and alerts
  • Handle user authentication events

Getting Started

1. Set Up Your Endpoint

Create an HTTPS endpoint on your server to receive webhook payloads:
path=null start=null

2. Register Your Webhook

Register your endpoint with the M.O.N.K.Y API:
Response:

3. Verify Webhook Signatures

Always verify webhook signatures to ensure authenticity:
path=null start=null

Event Types

Transaction Events

Triggered when a transaction is submitted to the network
Triggered when a transaction receives network confirmation
Triggered when a transaction fails or is rejected
Triggered when the wallet receives an incoming transaction

Wallet Events

Triggered when wallet balance changes
Triggered when a new wallet is connected to the platform
Triggered when a wallet is disconnected from the platform

Price Alert Events

Triggered when a price alert condition is met
Triggered when token prices have significant movements

Staking Events

Triggered when SOL is delegated to a validator
Triggered when staking rewards are distributed
Triggered when stake is undelegated from a validator

Webhook Management

List All Webhooks

Response:

Update Webhook

Delete Webhook

Test Webhook

Send a test payload to verify your endpoint:

Best Practices

1. Handle Idempotency

Webhooks may be delivered multiple times. Use the transaction_id or event ID to implement idempotency:
path=null start=null

2. Implement Retry Logic

Handle failed webhook deliveries gracefully:
path=null start=null

3. Secure Your Endpoint

Always verify webhook signatures and use HTTPS:
path=null start=null

4. Log Webhook Events

Maintain detailed logs for debugging and monitoring:
path=null start=null

Rate Limits

Webhook deliveries are subject to rate limits:
  • Maximum Attempts: 5 retry attempts per webhook
  • Retry Delays: Exponential backoff (1s, 2s, 4s, 8s, 16s)
  • Timeout: 30 seconds per delivery attempt
  • Maximum Events: 10,000 webhook events per hour per endpoint

Troubleshooting

Common Issues

Possible Causes:
  • Endpoint URL not accessible from the internet
  • Firewall blocking incoming requests
  • SSL certificate issues with HTTPS endpoint
  • Webhook is inactive or misconfigured
Solutions:
  • Test endpoint accessibility with tools like ngrok for development
  • Check webhook status via API
  • Verify SSL certificate is valid
  • Use webhook test endpoint to verify configuration
Possible Causes:
  • Incorrect webhook secret
  • Body parsing changing the payload
  • Clock synchronization issues
Solutions:
  • Verify webhook secret matches registered value
  • Use raw body for signature verification
  • Check system time synchronization
Possible Causes:
  • Network issues causing retries
  • Multiple webhook endpoints registered
  • Processing errors causing failed deliveries
Solutions:
  • Implement idempotency using event IDs
  • Check for duplicate webhook registrations
  • Ensure proper HTTP status codes in responses

Webhook Monitoring

Monitor webhook health and performance:
path=null start=null
Need help with webhooks? Check our FAQ or contact our technical support team.
Development Tip: Use tools like ngrok or webhook.site for testing webhooks during development.