title: Why are sms credits not deducted from our users account on our sms sales portal written in java
body: <p>we coded an sms sales platform in java using the api gateway of a reputable company but this problem occurs occasionally especially when sending message to large volume of phone numbers, different times and for different reasons, when a user sends out bulk sms, his own user account is not debited rather our account with our gateway providers is debited. This means that the users sms units is usually partly debited or not debited at all while our sms account with the sms company is debited.</p>
  
  <p>i understand that our sms account should be debited for every message sent by our users but the question is why is the deduction not reflecting on the account of the user who sent the sms? any help will be greatly appreciated.</p>
  
  <p>someone advised me to use error caching, but been a bit new to this i also want to know, what specific kind of error/errors should i code against that can stop the disaster above from happening again?</p>