API Reference
Webhook subscription endpoints
Subscribe to real-time events from SmartMCA.
GET /api/public/v1/webhooks
Required Scope: webhooks:read
GET /api/public/v1/webhooks/:id
Required Scope: webhooks:read
POST /api/public/v1/webhooks
Required Scope: webhooks:write
{
"url": "https://your-server.com/webhooks",
"events": ["deal.funded", "payment.completed"],
"description": "Production webhook"
}
Response includes the signing secret (shown only once):
{
"data": {
"id": "clx...",
"url": "https://your-server.com/webhooks",
"events": ["deal.funded", "payment.completed"],
"secret": "whsec_abc123...",
"status": "active"
}
}
PATCH /api/public/v1/webhooks/:id
Required Scope: webhooks:write
{
"events": ["deal.funded", "deal.paid_off"],
"status": "paused"
}
DELETE /api/public/v1/webhooks/:id
Required Scope: webhooks:write
GET /api/public/v1/webhooks/:id/deliveries?page=1&limit=20
Required Scope: webhooks:read
| Event | Description |
|---|---|
deal.created | New deal created |
deal.updated | Deal updated |
deal.status_changed | Deal status changed |
deal.funded | Deal funded |
deal.paid_off | Deal fully paid |
application.created | New application submitted |
application.updated | Application updated |
application.stage_changed | Application stage changed |
application.status_changed | Application status changed |
merchant.created | New merchant created |
merchant.updated | Merchant updated |
payment.created | Payment recorded |
payment.completed | Payment completed |
payment.failed | Payment failed |
document.uploaded | Document uploaded |
See the Webhooks Guide for verification and handling details.