22 subs auto-refunded because my acknowledge job ran nightly play-billing
610 subscription purchases last month. 22 of them were refunded automatically and I only found out because a user asked why Pro turned off after two days.
I acknowledge purchases in a nightly reconcile job. Median acknowledgement age was 31 hours, p99 was 84. Anything past 72 hours gets refunded and the entitlement revoked, and there is no error, no failed call, nothing anywhere that shouts. The money quietly went back.
Slightly shaken. What is the correct plumbing?
@thermal_theo · 3h ago · 3 replies
Acknowledge inline, in seconds, never in a batch. The flow that works:
Acknowledgement must never live in something that can be delayed, because delay is the entire failure mode. There is no retry budget - the clock belongs to someone else.
Then turn on real-time developer notifications through Pub/Sub. That is how you learn about renewals, cancellations, refunds and grace period without polling, and it is the thing that would have told you about the 22 on day one.
Reply
Report
@row_level_sam · 3h ago
Worth stressing the order: acknowledge on successful verification even if your own entitlement write then fails. You can repair your database at leisure. You cannot un-refund a purchase.
Reply
Report
@secondhandamps · 3h ago
And keep the client-side acknowledge as a fallback for when your backend was unreachable at purchase time. Doing it in both places is normal here, not paranoid - the operation is idempotent and the downside of missing it is total.
Reply
Report