reportTransaction method
In Observer mode, Adapty SDK doesn’t know, where the purchase was made from. If you display products using our Paywalls or A/B Tests, you can manually assign variation to the purchase. After doing this, you’ll be able to see metrics in Adapty Dashboard.
Parameters:
transactionId: A string identifier of your purchased transaction SKPaymentTransaction (SK1) or Transaction (SK2) for iOS or string identifier (purchase.getOrderId()) of the purchase, where the purchase is an instance of the billing library Purchase class for Android.variationId: A string identifier of variation. You can get it using the variationId property of AdaptyFlow / AdaptyFlowPaywall.
Implementation
Future<void> reportTransaction({
required String transactionId,
String? variationId,
}) {
return _invokeMethod<void>(
Method.reportTransaction,
(data) => null,
{
Argument.transactionId: transactionId,
if (variationId != null) Argument.variationId: variationId,
},
);
}