diff --git a/sdk/quickstart-react-native.mdx b/sdk/quickstart-react-native.mdx
index 00a09cf..6051b48 100644
--- a/sdk/quickstart-react-native.mdx
+++ b/sdk/quickstart-react-native.mdx
@@ -154,9 +154,13 @@ import { createCustomPurchaseConfig } from 'expo-helium';
// In your initialize call:
purchaseConfig: createCustomPurchaseConfig({
- makePurchase: async (productId) => {
- // Your purchase logic here
- // Return a HeliumTransactionStatus
+ makePurchaseIOS: async (productId) => {
+ // Your iOS purchase logic here
+ return { status: 'purchased' };
+ },
+ makePurchaseAndroid: async (productId, basePlanId, offerId) => {
+ // Your Android purchase logic here
+ // basePlanId and offerId are for subscription offers
return { status: 'purchased' };
},
restorePurchases: async () => {
@@ -171,9 +175,13 @@ import { createCustomPurchaseConfig } from '@tryheliumai/paywall-sdk-react-nativ
// In your initialize call:
purchaseConfig: createCustomPurchaseConfig({
- makePurchase: async (productId) => {
- // Your purchase logic here
- // Return a HeliumTransactionStatus
+ makePurchaseIOS: async (productId) => {
+ // Your iOS purchase logic here
+ return { status: 'purchased' };
+ },
+ makePurchaseAndroid: async (productId, basePlanId, offerId) => {
+ // Your Android purchase logic here
+ // basePlanId and offerId are for subscription offers
return { status: 'purchased' };
},
restorePurchases: async () => {
@@ -184,6 +192,14 @@ purchaseConfig: createCustomPurchaseConfig({
```
+
+ **Android subscription parameters:** `basePlanId` and `offerId` are optional parameters for identifying subscription plans and promotional offers in Google Play. These are only passed on Android and will be `undefined` on iOS.
+
+
+
+ The deprecated `makePurchase` handler is still supported for backward compatibility, but we recommend using the platform-specific handlers (`makePurchaseIOS` and `makePurchaseAndroid`) instead.
+
+
```tsx
type HeliumTransactionStatus =
'purchased' | 'failed' | 'cancelled' | 'pending' | 'restored';