cURL
curl --request POST \ --url https://api.agentwallex.com/api/v1/webhooks \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "url": "https://your-app.com/webhooks/agentwallex", "events": [ "payment.completed", "payment.failed", "policy.violated" ], "secret": "whsec_your_signing_secret" } '
{ "id": "whk_abc123", "url": "https://your-app.com/webhooks/agentwallex", "events": [ "payment.completed", "payment.failed", "policy.violated" ], "status": "active", "created_at": "2025-06-01T10:00:00Z" }
註冊新的 Webhook 端點以接收即時事件通知。
whsec_
curl -X POST https://api.agentwallex.com/api/v1/webhooks \ -H "X-API-Key: awx_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-app.com/webhooks/agentwallex", "events": ["payment.completed", "payment.failed", "policy.violated"], "secret": "whsec_your_signing_secret" }'
{ "id": "whk_abc123", "url": "https://your-app.com/webhooks/agentwallex", "events": ["payment.completed", "payment.failed", "policy.violated"], "status": "active", "created_at": "2025-06-01T10:00:00Z" }
API key authentication. Keys are prefixed with awx_.
awx_
The HTTPS URL that will receive webhook events.
List of event types to subscribe to (e.g., payment.completed, payment.failed, policy.violated).
payment.completed
payment.failed
policy.violated
Signing secret used to verify webhook payloads. Must start with whsec_.
Webhook created successfully.
A registered webhook endpoint for receiving real-time event notifications.
Unique webhook identifier (e.g., whk_abc123).
whk_abc123
HTTPS URL that receives webhook events.
List of subscribed event types.
Webhook status.
active
inactive
ISO 8601 creation timestamp.