Webhook API Delivery

For long-running API operations, responses are delivered via webhook callback instead of blocking the connection. Fire and forget.

Live Demo — This demo runs on a testnet using test USDC. When you install your own Sertone, it connects to the production blockchain with real USDC.

How It Works

CONSUMER API call + webhook URL 1. Request SERTONE Route + Settle 2. Forward API OWNER Long-running process 3. ACK (202 Accepted) 4. Processing... Response Ready Result payload 5. Webhook callback → consumer endpoint WEBHOOK ENDPOINT https://your-app.com/hook

Consumer sends a request with a webhook callback URL. The API owner processes the request asynchronously and delivers the response to the consumer's webhook endpoint.

Why Webhook Delivery?

Not every API call returns in milliseconds. Machine learning inference, batch data processing, report generation — these operations can take seconds or minutes. Holding an HTTP connection open that long is fragile and wasteful.

With Sertone webhook delivery, the consumer fires a request and immediately gets a 202 Accepted response. When the owner finishes processing, the result is pushed to the consumer's webhook endpoint. No polling, no timeouts, no dropped connections.

Real-world example: a data analytics platform subscribes to a heavy-compute API that generates financial reports. Each report takes 30-60 seconds. With webhook delivery, the platform submits requests and processes results as they arrive — no long-polling infrastructure needed.

Live Demo — Webhook Delivery Flow

Webhook Delivery Test

Click "Run Demo" to submit a request with webhook delivery. You'll see the immediate ACK response and the simulated webhook callback.

Code Samples

# Call the API through YOUR local Sertone control center
$ curl -X POST https://localhost:3000/internal/call \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_CONSUMER_SECRET" \
  -d '{"api_id_public": "API_UUID_FROM_CATALOG", "method": "POST", "path": "/", "params": {"action": "generate-report", "format": "json", "webhook_url": "https://your-app.com/hook"}}'

# Response: 202 Accepted with request ID
# Webhook callback hits your endpoint when ready
// Call the API through YOUR local Sertone control center
// Consumer secret is in Settings > Security
const response = await fetch('https://localhost:3000/internal/call', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_CONSUMER_SECRET'
  },
  body: JSON.stringify({
    api_id_public: 'API_UUID_FROM_CATALOG',
    method: 'POST',
    path: '/',
    params: {
      action: 'generate-report',
      format: 'json',
      webhook_url: 'https://your-app.com/hook'
    }
  })
});
const ack = await response.json();
console.log('Request accepted:', ack.result.requestId);

// Your webhook endpoint receives the result
// Express.js example:
app.post('/hook', (req, res) => {
  const result = req.body;
  console.log('Webhook received:', result);
  res.sendStatus(200);
});
# Call the API through YOUR local Sertone control center
import requests

response = requests.post(
    'https://localhost:3000/internal/call',
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_CONSUMER_SECRET'
    },
    json={
        'api_id_public': 'API_UUID_FROM_CATALOG',
        'method': 'POST',
        'path': '/',
        'params': {
            'action': 'generate-report',
            'format': 'json',
            'webhook_url': 'https://your-app.com/hook'
        }
    }
)
print(response.json()['result'])

Self-Host: Configure Webhook Delivery

1

Install the Control Center

Run the free Sertone Docker container. No cloud account needed.

$ docker run -d --name sertone \
  -p 3000-3003:3000-3003 -p 3005-3006:3005-3006 \
  -v sertone-data:/app/data \
  sertone/wrapper:latest
2

Open the Web Console

Go to https://localhost:3002/panel in your browser. Create your account, accept terms, and your wallet is generated automatically.

3

Browse the Catalog

Click Catalog & SDKs in the sidebar. Search for APIs, try them in demo mode (free), then switch to production when ready.

4

Make Your First Call

Copy your consumer secret from Settings > Security, then use the code samples above to call any API from your own code.