Get WhatsApp service window billing
Returns message counts and the estimated Meta cost for a WhatsApp service window.
GET
Returns message counts and the estimated Meta cost for a WhatsApp service window.
apiKeyheader
x-api-key<token>serviceWindowId*stringMatch
^wasw_[0-9a-hjkmnp-tv-z]{16,24}$Success
application/json- response
totalMessages*integerRange
0 <= value <= 9007199254740991totalFreeMessages*integerRange
0 <= value <= 9007199254740991totalPaidMessages*integerRange
0 <= value <= 9007199254740991estimatedProviderCosts*array<>import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.whatsapp.getServiceWindowBilling({
"serviceWindowId": "example"
});Example Response
{
"totalMessages": 0,
"totalFreeMessages": 0,
"totalPaidMessages": 0,
"estimatedProviderCosts": [
{
"amount": "string",
"currency": "string"
}
]
}