I have been using a Twilio phone number connected to a WhatsApp Business Account.
As far as I understand, for each conversation started, WhatsApp gives me a 24-hour window where I can send and receive any number of messages without additional charges (WhatsApp Conversation - Free Tier). However, it seems that I am somehow incurring in additional charges for each message sent and received (Messaging Channels Inbound Message and Messaging Channels Outbound Message where each costs $0.005).
I configured the WhatsApp sender to work with a webhook redirecting to an Azure Function App running Python Flask. Despite I can answer an incoming message via a Python Flask, I chose answering via the Twilio REST API (from twilio.rest import Client), since the webhook method gives me only 15 seconds to send an answer or it cuts the connection throwing error 11200, and some of my processes take longer than that.
Are this extra costs because I am using the Twilio REST API or is this a normal behavior of Twilio WhatsApp?
No, this is not related to the way you implemented the conversation. It's just the normal Twilio WhatsApp pricing.
WhatsApp pricing is calculated based on Meta's conversation-based pricing fee and Twilio's per-message fee. The Meta conversation-based pricing fee varies by use case and is charged in 24-hour increments that start when the first message from a business is delivered. The number of messages vary by conversation.