On the morning of 27 May 2026 the developer behind Healthchecks.io, a cron-monitoring service, got an email from Twilio with the subject line "Your Twilio account is suspended and will continue to be charged." Over the previous twelve hours someone had mass-created free accounts and sent the five SMS messages each free account allowed to random Moroccan numbers. That came to about 8,000 messages and "added ~$1800 to our Twilio bill", and it only surfaced because auto-recharge hit the card's daily spending limit and the balance ran out. Twilio "graciously agreed to issue refund credit for the full amount", once the developer had closed the hole, tightened the account's geographic permissions and turned on SMS pumping protection.
Every message in that attack was a real, correctly metered event. The quantity on the invoice was right; what was in dispute was whether the customer should pay for it, and that got settled by a support conversation, not by anything in the meter. The earlier posts in this series each took one decision a usage pipeline has to make. A Twilio invoice raises several at once, because the price of one text message is built from pieces that come from different places.
Three prices in one message
Twilio's US SMS pricing page puts the base rate at "$0.0083 per 160-character segment", in or out, on long codes, toll-free numbers and short codes alike. On top of that, "there are additional carrier fees per message that are automatically applied based on the end-user's destination and carrier": an outbound long-code SMS to an AT&T number carries $0.0035, to T-Mobile $0.0045, to Verizon $0.005, with another row for "all other carriers". Then there's a third line: "A failed message processing fee of $0.001 per message will be applied only to messages that terminate in a 'Failed' status." The page also says "prices may change from time to time without notice and additional carrier fees may apply."
The segment is the first thing a customer has to get right. Twilio's glossary says "Twilio bills SMS per message segment sent", and a segment holds 160 characters in GSM-7 encoding but only 70 in UCS-2. One emoji is enough to switch the whole message: "a message of 140 characters that includes one non-GSM character gets split into two segments", which doubles the base charge for that message. What are you counting? was about choosing a unit; here the unit is chosen for you by the content of the message, and the sender's own count of messages sent can differ from the count on the invoice.
The carrier fee is the part Twilio doesn't price. Its FY2025 10-K describes "recent increases to A2P messaging fees charged by major U.S. mobile carriers", says "such fees may increase further over time", and is plain about what it does with them: "We pass these fees through to our customers at cost. As a result, we recognize an equal amount of revenue and cost of revenue related to these fees." They "do not impact our gross profit" but are "a modest headwind to our gross margins", since the same dollar sits on both lines. Elsewhere the filing notes that "in some markets, fees charged by our network service providers change daily or weekly." So a single line on the invoice is a rate set by a third party, re-priced on that party's schedule, keyed to which carrier happens to serve the recipient's number, which the sender usually doesn't know when they hit send.
Modelling it, on paper
As in the rest of the series, this maps the published pricing onto Revenue Cloud Usage Management using the public data model in the SalesforceLabs repository. It's a thought experiment, not a claim about how Twilio bills, and the platform behaviours below are the repo's account of them, not something I've run.
The base rate is the easy part. A UsageResource for outbound SMS with a segment as its unit of measure, a RateCardEntry at $0.0083, and each send lands as a TransactionJournal row. The first decision is what the journal row counts: if it records messages, something downstream has to know each message's encoding to turn it into segments; if it records segments, the sender's system has to do that arithmetic before the event is written, and any disagreement with the vendor's count shows up only at the invoice.
The carrier fee is where the design gets a real choice. The rates domain lists a RateAdjustmentByAttribute, an "attribute-based adjustment on a rate card entry", so one shape is a single segment resource whose rate moves with a carrier attribute on the event. The other is a separate resource per fee, so that the carrier fee rates and appears on its own line. The first keeps the invoice short and hides the pass-through inside a blended rate; the second lets a customer check the carrier line against the carrier's published fee, which is the only way to check it at all, since the vendor didn't set the number. Either way the event needs to carry the carrier, which the sending system doesn't usually have when it writes the row and has to get from a lookup or from the vendor's own delivery record.
Then there's the schedule. The repo's usage notes record a case where a commitment's rate is looked up through a decision table that wasn't in the refresh chain, so a commitment sold after the org was built "can rate at the undiscounted anchor rate" until the table refreshes; the fix added it to the chain, after which it refreshed "~6s after the rows are created." The bug was fixed, but it shows that a rate held in a lookup table is only as current as the table's last sync, and a fee that the 10-K says can change weekly needs the rate history kept by effective date, so that a message sent on Tuesday rates at Tuesday's fee even if the journal is rated on Friday. Usage that arrives late made the same point about events; a pass-through fee makes it about prices.
The failed-message fee adds a status problem. Whether $0.001 applies depends on a message that "terminates" as failed, and that status comes back from the network after the send. The journal row either waits for the final status before it's written, or is written at send and corrected when the delivery receipt arrives, and a correction after the period closes runs into the problem from The period that closes.
The credit that settles it
The Healthchecks refund doesn't fit anywhere in that pipeline, and Twilio's accounting doesn't pretend it does. The 10-K says "credits may be issued on a case-by-case basis", and that credits "are accounted for as variable consideration", "estimated based on historical trends and are recorded against revenue." Twilio estimates its credits from history before anyone asks for one; the meter records the 8,000 messages as billable, and the correction arrives later as a credit with no usage event behind it, the same kind of gap Credits that expire found when a balance lapses without anything being consumed.
A carrier fee passed through at cost is a number the customer can in principle check against the carrier, and a segment count is one they can reproduce from their own message log. A pumping refund is neither: it depends on a conversation, on conditions the vendor sets after the fact, and on an estimate the vendor booked in advance from its own history. If the invoice is going to convince someone, which of those three would a customer actually be able to verify without picking up the phone?
No comments yet