❓ Your Question
We are currently migrating from StoreKit 1 to StoreKit 2.
The issue occurs in the current production App Store application.
We are using an older version of Flutter and in-app purchase libraries, and upgrading them is not an option at the moment.
Why is FlutterInappPurchase.purchaseUpdated.listen(..) triggered earlier than the transactionDate?
This is happening in the iOS sandbox environment.
The first subscription is a free trial (3 minutes), followed by recurring charges every 5 minutes.
💻 Current Code
Future<void> init(AppState state) async {
...
FlutterInappPurchase.purchaseUpdated.listen((productItem) {
debugPrint('=============== purchase-updated: $productItem');
final nowMs = DateTime.now().millisecondsSinceEpoch;
final dateTime = DateTime.fromMillisecondsSinceEpoch(nowMs);
debugPrint('>> dateTime = $nowMs ------> ($dateTime)');
});
...
}
Logs:
1. First payment
=============== purchase-updated: productId: .., transactionId: .., transactionDate: **2025-12-12T15:16:13.000**, transactionReceipt: ...
>> dateTime = 1765520177927 ------> (**2025-12-12 15:16:17.927**)
2. updated
Purchase Successful !!
=============== purchase-updated: productId: .., transactionId: .., transactionDate: **2025-12-12T15:19:13.000**, transactionReceipt: ...
>> dateTime = 1765520331297 ------> (**2025-12-12 15:18:51.297**)
2. updated
Purchase Successful !!
=============== purchase-updated: productId: .., transactionId: .., transactionDate: **2025-12-12T15:24:13.000**, transactionReceipt: ...
>> dateTime = 1765520637362 ------> (**2025-12-12 15:23:57.362**)
📱 Environment
Flutter doctor:
• Flutter version 3.16.3
• Dart version 3.2.3
• DevTools version 2.28.4
Package version:
- flutter_inapp_purchase: ^5.4.2
Platform:
❓ Your Question
We are currently migrating from StoreKit 1 to StoreKit 2.
The issue occurs in the current production App Store application.
We are using an older version of Flutter and in-app purchase libraries, and upgrading them is not an option at the moment.
Why is FlutterInappPurchase.purchaseUpdated.listen(..) triggered earlier than the transactionDate?
This is happening in the iOS sandbox environment.
The first subscription is a free trial (3 minutes), followed by recurring charges every 5 minutes.
💻 Current Code
📱 Environment
Flutter doctor:
Package version:
Platform: