appAccountToken not returned in purchase of purchaseUpdatedListener
I passed in a uuid to the appAccountToken, this is not returned anywhere inside the purchase of purchaseUpdatedListener. The field is definitely passed in correctly as I see the value inside the notification received under transactionInfo.
I'm passing in as
await requestSubscription({ sku: subscriptionSKU, appAccountToken: user_uuid });
Ok. I found it inside latest_receipt_info but not in_app inside transactionReceipt.recipe
hi @CyberTron88
can you please provide full explaination of it, I tried passing userID to appAccountToken but didn't get it in purchaseUpdatedListener or latest_receipt_info. also It would be helpful if you share your code for IAP demo.
thanks for the help.
@Malhar62 It is working properly if you turn on storykit2 mode:
if (Platform.OS === 'ios') {
storekit2Mode();
}
initConnection().then(() => {
// ...
});
I found the way, appAccountToken has to be in UUID format then only we will receive it from webhook notification in backend. Not in any random string.
Yeah, that's the first thing that I did, but in storykit1 mode it wasn't working.
Oh okay, I am using storekit2, Thank you.
Have you found any solution for this @Malhar62 ?
@Karthik-V26 Can you show me your code? What kind of string is your appAccountToken? What platform are you testing it on?
@Karthik-V26 Can you show me your code? What kind of string is your appAccountToken? What platform are you testing it on?
@Karthik-V26 the type has to be UUID, apple has mentioned that on official docs otherwise it won't send token if it's in any other form.
@Malhar62 , You are right, If the type is UUID then I can see it. Thanks for the answer. Could you help me in knowing the advantages of UUID, I actually need some id to send to backend to identify the user. Like to differntiate the two app account users who tries to buy subscription using same appleID to avoid conflicts?
@Malhar62 , You are right, If the type is UUID then I can see it. Thanks for the answer. Could you help me in knowing the advantages of UUID, I actually need some id to send to backend to identify the user. Like to differntiate the two app account users who tries to buy subscription using same appleID to avoid conflicts?
On backend you can attach UUID to a user so each will have their unique UUID key, so after purchase backend will get appaccountToken as UUID and can differentiate user by that.
I’m closing all issues reported in versions below 14, as the library now supports the new architecture with NitroModules and has been completely revamped.