# NIKAME GENERATED — DO NOT EDIT DIRECTLY
from fastapi import APIRouter, Request, Depends, BackgroundTasks
from app.webhooks.security import verify_signature

router = APIRouter(prefix="/webhooks", tags=["Webhooks"])

async def process_webhook(payload: dict):
    # User: Implement business logic here
    print(f"Processing webhook: {payload}")

@router.post("/receive")
async def receive_webhook(
    request: Request,
    background_tasks: BackgroundTasks,
    verified: bool = Depends(verify_signature)
):
    payload = await request.json()
    background_tasks.add_task(process_webhook, payload)
    return {"status": "accepted"}
