https://retellai.com/?utm_source=discord&utm_medium=seo logo
how to get the costs of the call passed in the web...
# ❓・ai-evy-support
v
@AI Evy how to get the costs of the call passed in the webhook?
a
Thanks for tagging me @VI. I'll look through relevant sources and get back to you shortly.
### Answer The call cost information is included in the
call_ended
and
call_analyzed
webhook events. [(1) ]() When you receive these webhook events, the payload contains a
call_cost
object with the following structure: [(2) ]()
Copy code
json
"call_cost": {
  "product_costs": [
    {
      "product": "elevenlabs_tts",
      "cost": 60,
      "unit_price": 1,
      "is_transfer_leg_cost": true
    }
  ],
  "total_duration_seconds": 60,
  "total_duration_unit_price": 1,
  "combined_cost": 70
}
The
call_cost
object includes product-level costs, duration information, and the combined total cost. [(3) ]() This data is available in the webhook payload for both
call_ended
and
call_analyzed
events. [(1) ]()
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] List Calls](https://docs.retellai.com/api-references/list-calls) [[3] Get Call](https://docs.retellai.com/api-references/get-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy what about webchat?
a
Thanks for the follow-up, @VI. I'll get back to you soon.
### Answer The same webhook structure applies to web calls. The
call_cost
information is included in the
call_ended
and
call_analyzed
webhook events regardless of whether the call is a phone call or web call [(1) ]() . The webhook payload contains the
call_cost
object with product costs, duration, and combined cost details for both call types .
​ To learn more, see the sources I considered: [[1] Audio Basics](https://docs.retellai.com/knowledge/audio-basics) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.