Open source subscription
event handling
Instead of building and maintaining subscription event handling yourself, just call the SubTru API when you need to know a user's subscription status.
Self-host for free, or use SubTru Cloud if you prefer a managed service with a dashboard and analytics.
GET /access demo
Response
Sending...The GET /access response returns a list of entitlements for the specified user, each with a productId and a hasAccess boolean. You can use these values in your app to make product access decisions for that user. The response also returns accessReason and accessEndsAt values and has the same JSON body structure for Stripe, the Apple App Store, and Google Play.
How SubTru works
- SubTru receives subscription change events in the form of Stripe webhooks, Apple App Store Server Notifications, and/or Google Play Real-Time Developer Notifications whenever your users purchase or update their subscriptions.
- SubTru validates, deduplicates, and orders these events to store a record of your users' subscriptions across all supported providers.
- Your app calls the GET /access endpoint to get a user's current subscription status whenever you need it to make a product access decision.
Why subscription access is complicated
Subscription events don't always arrive cleanly, even from a single provider. Stripe webhooks, Apple App Store Server Notifications, and Google Play Real-Time Developer Notifications can each arrive more than once or out of order. Your subscription handler has to verify each event, drop the duplicates, and determine which change is the latest.
Small mistakes in that code can become serious access bugs. A user pays and gets nothing, a paying user gets locked out, or someone who stopped paying keeps access for free. Check out the guide on how subscription access works to learn more.