# Update URL and events curl -X PUT https://api.swiftpay.cx/api/webhooks/wh_abc123 \ -H "Authorization: Bearer mp_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "url": "https://new-url.yoursite.com/webhooks", "events": ["checkout.completed", "refund.completed"] }' # Disable endpoint curl -X PUT https://api.swiftpay.cx/api/webhooks/wh_abc123 \ -H "Authorization: Bearer mp_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{"isActive": false}'
{ "success": true, "data": { "id": "wh_abc123", "url": "https://new-url.yoursite.com/webhooks", "events": [ "checkout.completed", "refund.completed" ], "isActive": true, "description": "Production webhook handler", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-20T14:00:00Z" } }
Update an existing webhook endpoint’s configuration
{ "isActive": false }
{ "events": [ "checkout.completed", "checkout.failed", "refund.completed", "refund.failed" ] }
{ "events": ["*"] }