Skip to content

Instantly share code, notes, and snippets.

@iksecreeet
Created August 24, 2020 07:55
Show Gist options
  • Save iksecreeet/f8947201af61e0e8e3eeee2016dc0317 to your computer and use it in GitHub Desktop.
Save iksecreeet/f8947201af61e0e8e3eeee2016dc0317 to your computer and use it in GitHub Desktop.
Get receipt RN IAP
import * as RNIap from 'react-native-iap';
RNIap. getPurchaseHistory().then((purchaseHistory) => {
if(purchaseHistory.length > 0) {
const getLastPurchase = purchaseHistory[purchaseHistory.length -1];
const getReceipt = getLastPurchase.transactionReceipt;
// DO RECEIPT RELATED TASK
}
});
this is how I get my latest subscription receipt anytime I want
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment