I'll assume United States as the country; the answer may (probably does) vary somewhat if this is not correct. Also, I preface this with the caveat that I am neither a lawyer nor an accountant. However, this is my understanding:
You must recognize the revenue at the time the credits are purchased (when money changes hands), and charge sales tax on the full amount at that time. This is because the customer has pre-paid and purchased a service (i.e. the "credits", which are units of time available in the application). This is clearly a complete transaction. The use of the credits is irrelevant. This is equivalent to a customer purchasing a box of widgets for future delivery; the payment is made and the widgets are available but have simply not been shipped (and therefore used). This mirrors many online service providers (say, NetFlix) in business model.
This is different from the case in which a customer purchases a "gift card" or "reloadable debit card". In this case, sales tax is NOT collected (because this is technically not a purchase). Revenue is also not booked at this time. Instead, the revenue is booked when the gift card's balance is used to pay for a good or service, and at that time the tax is collected (usually from the funds on the card). To do otherwise would greatly complicate the tax basis (suppose the gift card is used in a different state or county, where sales tax is charged differently? Suppose the gift card is used to purchase a tax-exempt item?)
For justification, see bankruptcy consideration of the two cases. In the former, the customer has "ownership" of an asset (the credits), which cannot be taken from him (although it might be unusable). In the latter, the holder of the debit card is technically an unsecured creditor of the company - and is last in line if the company's assets are liquidated for repayment.
Consider also the case where the cost of the "credits" is increased part-way through the year (say, from $10 per credit to $20 per credit) or if a discount promotion is applied (buy 5 credits, get one free). The customer has a "tangible" item (one credit) which gets the same functionality regardless of price. This would be different if instead of "credits" you instead maintain an "account" where the user deposited $1000 and was billed for usage; in this case you fall back to the "gift card" scenario (but usage is charged at the current rate) and revenue is booked when the usage is purchased; similarly, tax is collected on the purchase of the service. For this model to work, the "credit" would likely have to be refundable, and could not expire (see gift cards, above), and must be usable on a variety of "services". You may have particular responsibility in the handling of this "deposit" as well.