Billing for ongoing calls
# support
n
Is there a way to notify our server on ongoing call billing usage before it is hang? I have a monetization system and i have to reserve funds for an ongoing call to disallow user to spend over balance
v
There is no built-in webhook for real-time billing usage during an ongoing call. However, you can estimate usage by tracking call duration via status webhooks and calculating cost on your server. For example, use the
statusCallback
in Twilio to receive call progress events and update your billing logic:
Copy code
js
app.post("/participant-status", (req, res) => {
  const callStatus = req.body.CallStatus;
  // Update your billing system with the latest call duration here
  res.sendStatus(200);
});
Estimate cost based on duration and your rate card to reserve funds as the call progresses. [See more in the Vapi call handling docs.](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) Source: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio)
c
Hello, Billing information becomes available only after a call ends, once the call analysis is completed. This analysis runs in the background and typically finishes within a few seconds after the call concludes. For managing user balances in your use case, you may consider: - Setting a maximum call duration limit based on the user’s available balance and your pricing - Using background messages during the call to monitor call duration - Implementing a pre-authorization hold for the maximum expected charge
3 Views