· 4 min read
A webhook is a hint, not a fact
Why TimeUp treats payment webhooks as a wake-up call and only counts revenue after asking the provider directly.
When a payment provider calls your server to say a charge was approved, it is tempting to believe it and move on. In production that message can arrive late, arrive twice, arrive out of order, or not come from the provider at all.
Four ways a webhook lies
- It arrives twice, so you count the same payment twice.
- An old "pending" arrives after "approved" and rolls the status back.
- It is delayed, so the customer waits for something already paid.
- It is forged, so someone invents a payment that never existed.
One payment of $500 was made. Watch what each approach does with the messages that arrive.
- 1payment A: approved
- 2payment A: pending (arrives late)
- 3payment A: approved (duplicate)
- 4payment X: approved (forged)
- Revenue recorded
- $0
- What really happened
- $500
Treat it as a signal
In TimeUp's billing pipeline the webhook is only a wake-up call. When it arrives, the server asks the provider directly, with authentication, what the real state of that payment is. Revenue is recognized only from that answer.
Each monthly charge is also stored as an immutable billing obligation, so a repeated message finds the work already done instead of doing it again.
The cost is one extra request per event. The benefit is that no delayed, duplicate or forged message can double-bill a customer or suspend a business by mistake.