Framework guide

React Native purchase verification

Verify Google Play and Apple purchases from React Native — server-side, via REST API. Use your existing IAP library; Tierux verifies from your backend.

1

Use any React Native IAP library

Tierux is billing-library agnostic. Use react-native-iap, expo-in-app-purchases, or any other library that gives you a purchase token. Tierux handles verification server-side.

// Install your IAP library of choice
npm install react-native-iap
2

Get the purchase token

After a successful purchase, you receive a purchase token (Google Play) or transaction ID + JWS (Apple). Send this to your backend.

// After purchase with react-native-iap
const purchase = await RNIap.requestSubscription({
  sku: 'pro_monthly'
});

// Send token to your backend for verification
await fetch('https://your-api.com/verify', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    platform: Platform.OS,
    purchaseToken: purchase.transactionReceipt,
    productId: 'pro_monthly',
    packageName: 'com.yourapp'
  })
});
3

Verify from your backend

Your backend calls Tierux's REST API with the purchase token. Tierux verifies with Google Play or Apple and returns normalized entitlement state.

// Your backend (Node.js example)
const res = await fetch(
  'https://tierux.com/api/v1/purchases/google-play/verify', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    appId: 'app_123',
    userId,
    packageName: 'com.yourapp',
    productId: 'pro_monthly',
    purchaseToken
  })
});
4

Return entitlement state to the app

Your backend returns the entitlement state to your React Native app — use it to gate features or show subscription status.

// Your backend response
res.json({ active: true, entitlement: 'pro', expiresAt });

// In your React Native app
if (result.active) {
  unlockProFeatures();
}
Related guides

Purchase verification

Deep dive on how Tierux verifies tokens server-side for Google Play and Apple.

Server-side entitlements

Gate features from your backend after verification — one REST call per entitlement.

Quickstart docs

Full integration path with curl examples and language-agnostic endpoints.

Verify React Native purchases server-side

Free tier — unlimited apps, 1 paywall. No credit card, no revenue share.

Start free