@@ -31,6 +31,7 @@ The list of available methods for this plugin is described below.
3131 - [ setSharingFilter] ( #setsharingfilter )
3232 - [ setSharingFilterForPartners] ( #setsharingfilterforpartners )
3333 - [ validateAndLogInAppPurchase] ( #validateandloginapppurchase )
34+ - [ validateAndLogInAppPurchase(NEW)] ( #validateandloginapppurchasev2 )
3435 - [ updateServerUninstallToken] ( #updateserveruninstalltoken )
3536 - [ sendPushNotificationData] ( #sendpushnotificationdata )
3637 - [ addPushNotificationDeepLinkPath] ( #addpushnotificationdeeplinkpath )
@@ -44,6 +45,7 @@ The list of available methods for this plugin is described below.
4445 - [ setCollectIMEI] ( #setcollectimei )
4546 - [ setDisableNetworkData ` setDisableNetworkData(disable) ` ] ( #setdisablenetworkdata-setdisablenetworkdatadisable )
4647 - [ performOnDeepLinking] ( #performondeeplinking )
48+ - [ disableAppSetId] ( #disableappsetid )
4749- [ iOS Only APIs] ( #ios-only-apis )
4850 - [ disableCollectASA] ( #disablecollectasa )
4951 - [ disableIDFVCollection] ( #disableidfvcollection )
@@ -627,6 +629,53 @@ appsFlyer.validateAndLogInAppPurchase(info, res => console.log(res), err => cons
627629
628630---
629631
632+ ## New In-App Purchase Validation API
633+ The new ` validateAndLogInAppPurchase ` API uses ` AFPurchaseDetails ` and ` AFPurchaseType ` enum for structured purchase validation.
634+
635+ ### AFPurchaseType Enum
636+
637+ ``` javascript
638+ import { AFPurchaseType } from ' react-native-appsflyer' ;
639+
640+ AFPurchaseType .SUBSCRIPTION // "subscription"
641+ AFPurchaseType .ONE_TIME_PURCHASE // "one-time-purchase"
642+ ```
643+
644+ ### AFPurchaseDetails Interface
645+
646+ ``` typescript
647+ interface AFPurchaseDetails {
648+ purchaseType: AFPurchaseType ; // Type of purchase
649+ transactionId: string ; // Unique transaction identifier
650+ productId: string ; // Product identifier
651+ }
652+ ```
653+
654+ ### Usage Example
655+
656+ ``` javascript
657+ import appsFlyer , { AFPurchaseType } from ' react-native-appsflyer' ;
658+
659+ const purchaseDetails = {
660+ purchaseType: AFPurchaseType .SUBSCRIPTION ,
661+ transactionId: " google_play_purchase_token_123" ,
662+ productId: " com.example.app.premium_monthly"
663+ };
664+
665+ const additionalParams = {
666+ revenue: 9.99 ,
667+ currency: " USD"
668+ };
669+
670+ appsFlyer .validateAndLogInAppPurchase (
671+ purchaseDetails,
672+ additionalParams,
673+ (result ) => console .log (result)
674+ );
675+ ```
676+
677+ ---
678+
630679### updateServerUninstallToken
631680` updateServerUninstallToken(token, callback) `
632681
@@ -948,6 +997,25 @@ if (Platform.OS == 'android') {
948997
949998appsFlyer .startSdk (); // <--- Here we send launch
950999```
1000+
1001+ ### disableAppSetId
1002+ ` disableAppSetId() `
1003+
1004+ ** Disable the collection of AppSet ID.** <br />
1005+ ** Must be called before calling start.** <br />
1006+
1007+ * Example:*
1008+ ``` javascript
1009+ if (Platform .OS == ' android' ) {
1010+ appsFlyer .disableAppSetId ();
1011+ appsFlyer .initSdk ({
1012+ devKey: ' K2***********99' ,
1013+ isDebug: false ,
1014+ appId: ' 41*****44' ,
1015+ });
1016+ }
1017+ ```
1018+
9511019## iOS Only APIs
9521020
9531021### disableCollectASA
0 commit comments