# Twilio billing note
## Invoice overview

[invoice download link](https://console.twilio.com/us1/billing/manage-billing/billing-overview?frameUrl=%2Fconsole%2Fbilling%3Fx-target-region%3Dus1)
## Phone Number
### How to get price
1. Check at console [Active Number](https://console.twilio.com/us1/develop/phone-numbers/manage/incoming?frameUrl=%2Fconsole%2Fphone-numbers%2Fincoming%3Fx-target-region%3Dus1)

Note: API for type/locality is still under private development
2. Check price with Country, Type at [Number Prices CSV](https://console.twilio.com/us1/billing/manage-billing/pricing?frameUrl=%2Fconsole%2Fbilling%2Fpricing%3Fx-target-region%3Dus1)

---
### Information gap
Total price doesn't match our invoice because some number's information not recorded in Prices CSV.
Total price from invoice: 244
Calculated price without following numbers: 199
| Number | Country | Type | Service |
| ------------- | ------- | ------ | ----------------- |
| +525549998882 | MX | Mobile | N/A |
| +525549998751 | MX | Mobile | Gopro |
| +33644607939 | FR | Mobile | Tarte France |
| +601130116837 | MY | Mobile | Tarte Malaysia |
| +601130116870 | MY | Mobile | Tarte Singapore |
| +601130116721 | MY | Mobile | Tarte New Zealand |
However, we can get the actual charge of these numbers from invoice

199 + 15x2 + 2 + 5x3 = 246
---
### Match phone numbers to franchises
We have 112 active phone numbers and 32 of them don't have service id and MySQL records:
| Number | friendly name | Recently used in 2022 |
| ------------- | --------------------------------- |:--------------------- |
| +12484192340 | WhatsApp Dev Testing | No |
| +13162851098 | Sheplers Local | No |
| +16504354517 | Linc SMS Forwarder (650) 435-4517 | No |
| +16504801659 | (650) 480-1659 - IVR DemoStore | No |
| +16506704708 | Voice IVR Staging Testing | No |
| +18552044133 | Hourglass Angel | No |
| +18552094344 | Hugo Boss | No |
| +18552133057 | Better Braces US | No |
| +18552133392 | Loreal LaRoche Posay Toll Free | No |
| +18552187816 | P&G Shop | No |
| +18553758400 | Lime Crime | No |
| +18554224830 | Gentleman's Gazette | No |
| +18555820883 | eBags | No |
| +18556699816 | Reeds | No |
| +18556877541 | Sheplers Tollfree | No |
| +18557168544 | Country Outfitter Toll Free | No |
| +18558718786 | Boot Barn Toll Free | No |
| +18559530612 | Better Braces CA | No |
| +18559530618 | Lamps Plus | No |
| +18559546872 | Planet Blue | No |
| +18559710792 | Jockey | No |
| +18559770868 | SMB Phone Number | No |
| +18559798790 | Vega | No |
| +18559800198 | GoPro US | No |
| +18559805747 | Supercell | No |
| +18552325462 | N/A | No |
| +19287233499 | N/A | No |
| +525549998882 | N/A | No |
| +12092596858 | N/A | Yes |
| +16504605161 | Voice IVR testing | Yes |
| +17073293609 | Crazy 8 | Yes |
| +18553873177 | Pacsun | Yes |
---
## Messages

We can divide the SMS billing to franchises (Through API and service_id/MySQL), but SMS carrier fee can't map to each franchises:

---
## Should ask Twilio
- How to divide SMS carrier fee to each SMS log
- How to get type or monthly charge of each phone number
- Update the Phone Number Prices CSV