Overview
When using Twilio’s Messaging Services and Event Streams webhooks, it’s important to understand how and when you can access information about SMS message fees, carrier fees, and phone number monthly fees. This article explains the timing and methods for retrieving these fees, and clarifies what information is available via webhooks and APIs.
What You Need To Know
When is SMS Message Pricing Available?
Message Fee Timing:
The cost of an SMS message (including any carrier fees) is not always available immediately after the message is sent.
- The
com.twilio.messaging.message.sentwebhook event indicates the message has been sent, but the final price may not be populated yet. - For the most accurate pricing, wait for the
com.twilio.messaging.message.deliveredwebhook event, which signals successful delivery. - Even after delivery, the
pricefield in the Message Resource may take additional time (up to 24 hours in rare cases) to be populated, due to dependencies on carrier reporting.
Best Practice:
Periodically poll the Message Resource via the Twilio REST API to check for the price field after delivery. This ensures you capture the final cost once it becomes available.
What Does the price Field Include?
The price field in the Message Resource represents the total cost of sending the message. This total includes:
- The Twilio message fee
- Any applicable carrier fees (such as surcharges imposed by mobile carriers)
Note: There is no separate field for carrier fees at the individual message level. The total cost is always shown as a single value.
How Can I Track Carrier Fees and Phone Number Monthly Fees?
Carrier Fees:
- Carrier fees are included in the
pricefield for each message. - There is no webhook event or separate field that reports only the carrier fee for each message.
Phone Number Monthly Fees:
- Currently, there are no webhook events that notify you about monthly phone number fees.
- These recurring charges can be reviewed in your Twilio Console’s billing section or via the Usage API.
Frequently Asked Questions
Is the price always available when I receive the delivered webhook?
Not always. While the delivered event is the best indicator that pricing will soon be available, the price field may still take some time to populate due to carrier processing delays.
Can I get a breakdown of carrier fees per message?
No, the carrier fee is included in the total price. For more detailed breakdowns, use the Usage API to analyze costs over time.
How long can it take for the price to appear?
Typically, the price is available soon after delivery, but in rare cases, it may take up to 24 hours.
Conclusion
- Use the
deliveredwebhook as your signal to begin checking for message pricing. - The
pricefield includes both Twilio and carrier fees. - There are no webhook events for phone number monthly fees; use the Console or Usage API for these.
- Pricing data may be delayed due to carrier processing.
Below you will find references to useful documents:
- Twilio Message Resource API Documentation
- Twilio EventStream
- Twilio Usage API
- Carrier Fees Help Center Article
If you have further questions, consult the resources above or reach out for additional support.