Skip to main content

I need the original transaction id to send it to backend. We use original transaction id to check whether a used has renewed a subscription or not. I can’t check for renewals in the app because our service works outside the app, even if a user deletes the app. I was using StoreKit and had access to it but I can’t seem to find it when using RevenueCat Paywalls. How can I access the original transaction id?

Hi @irmak-5f9246,

When completing a purchase via a RevenueCat paywall, the original transaction ID will be in the storeTransaction parameter of the callback:

            .presentPaywallIfNeeded(
requiredEntitlementIdentifier: "pro",
purchaseCompleted: { customerInfo, storeTransaction in
print("Purchase completed: \(customerInfo.entitlements)")
}

Outside of that, you’ll have to get the original transaction ID by reading the receipt manually. You can use the built in LocalReceiptParsing package in the RevenueCat SDK to get that.