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.

Frequently asked questions

How do I verify purchases in React Native with Tierux?
Use a React Native billing library (like react-native-iap) to get the purchase token from Google Play or StoreKit, then POST it to your backend — which calls Tierux's REST API to verify server-side. Tierux returns normalized entitlement state: active, expired, or in grace period.
Does Tierux have a native React Native module?
Tierux's approach for React Native is REST-first — you use any existing React Native IAP library for the purchase flow and send tokens to your backend for verification. This avoids native module maintenance overhead and works with any backend language.
Is the API key safe in React Native?
Your Tierux API key never goes in your React Native app. Verification calls go from your backend to Tierux — the client never holds a secret. Your React Native code sends the purchase token to your backend, which authenticates to Tierux server-side.

Verify React Native purchases server-side

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

Start free