Hello ,
Running into an issue with SMS billing where cost
and debit
behave differently.
The cost
command works as expected.
Working cost
command:
cost Tenant="[MyTenant]" Category="sms" Subject="[MyAccount]" AnswerTime="2025-06-11T14:45:00Z" Destination="[MyDestination]" Usage="1"
Result:
It correctly finds the event-based rate and gives the right cost.
{
"Cost": 0.02,
"Rates": { "..." : [ { "RateUnit": "1ns", "Value": 0.02 } ] },
"Usage": "1ns"
}
When I try to actually debit it, the cost is 0.
Failing debit
command:
debit Tenant="[MyTenant]" Category="sms" Account="[MyAccount]" Destination="[MyDestination]" TimeStart="2025-06-11T14:45:00Z" TimeEnd="2025-06-11T14:45:00Z" Usage="1" CallDuration="1"
Result:
The balance is unchanged and key fields are zero or null.
{
"AccountSummary": { "Initial": 6.4, "Value": 6.4 },
"Cost": 0,
"RatedUsage": 0,
"Timespans": [ { "Cost": 0, "RateInterval": null } ]
}
The debit
output has "RateInterval": null"
, so it's clearly not finding a rate.
Are there any pointers to this
Thanks.