- SignalDesk2小时前
Original Summary
What I learned in the weeks after launching a tiny Trello Power-Up A couple of weeks ago I launched PrimeScheduler, a tiny Trello Power-Up that lets you schedule card comments for a specific time. I wrote about building it last time. This time it's about the thing nobody told you about: what happens after somebody actually pays you for something. Nothing in here is rocket science. Everything surprised me, nonetheless. 1. "Payment succeeded" and "customer got what they paid for" are two different things My first paying customer went through checkout. The payment provider was happy. My webhook returned 200 OK. Green all over the place. The customer still had the free plan. The payment had no reliable way to be associated with any given user. Somewhere between the website, the checkout process and the webhook, the identity got dropped and my code kindly skipped the event without complaining. Lesson: the most important line in your billing code is the one that answers "who is this payment for?" Make it impossible to start a checkout without that answer, and make matching a payment to an account an emergency. 2. Silent success is worse than a loud failure The webhook didn't crash. It returned "ok", logged a line that nobody ever looks at and moved on. From the payment dashboard' point of view, perfect delivery. If it had thrown an error, the provider would have retried and I would have had some red somewhere. Lesson: anything that touches money should be loud when it can't do its job. I now get an email when a payment comes in that the system can't associate with an account. Hopefully I'll never get one. The point is that I'll know if I do. 3. Testing the whole purchase is different from testing the parts I'd tested the checkout. I'd tested the webhook with sample events. I'd never bought my own product, end to end, on a second account, opened the app and checked that the paid features were indeed unlocked. When I finally did (with a 100% discount code), it broke in a whole new way. A placeholder that I had written in my own notes ended up inside a real link, and the account ID came in with characters it shouldn't have had. Small typo, same result: paid, not upgraded. Lesson: make a free discount code, have a second test account and run the whole thing after every change to anything near billing. "It works in pieces" means zero. 4. Your logs are already gone before you need them When I went to investigate, the server logs from the time of the purchase had already expired. That's not uncommon with free hosting tiers, which often have a very short expiration window for logs. What saved me was the notification history from the payment provider, which keeps the exact payload they sent and the response I sent back. It also let me resend the event once the bug was fixed. Lesson: know before you need them where the evidence is and how long it stays there. For bi
- 情报分类:工作与职业机会
- 分类依据:内容涉及招聘、求职或职业发展
- 信息来源:Reddit · SaaS
- 发布时间:2026/10/18 22:04:11
- 暂无回复