Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Identifiers do not match in Sandbox for iOS #1093

Open
5 tasks done
gfaraj opened this issue Sep 22, 2024 · 3 comments
Open
5 tasks done

Transaction Identifiers do not match in Sandbox for iOS #1093

gfaraj opened this issue Sep 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@gfaraj
Copy link

gfaraj commented Sep 22, 2024

Describe the bug
For iOS Sandbox transactions, the "transaction_id" field in the webhook is something like "StoreKitTest_Transaction_7d5df4466d669078a079d2c0d58f65d9_3" while in-app the result of purchaseProduct will have transactionIdentifier equal to just "3". I'm expecting these two things to match up for some fulfillment logic.

  1. Environment
    1. Platform: iOS
    2. SDK version: 8.2.1
    3. OS version: iOS 18.0 (also tried in 16.4)
    4. Xcode/Android Studio version:
    5. React Native version: 0.73.6
    6. SDK installation (CocoaPods + version or manual):
    7. How widespread is the issue. Percentage of devices affected.
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
    1. Call purchaseProduct for a consumable product in iOS simulator
    2. Examine result.transaction.transactionIdentifier
      1. Expected: this value is unique and matches the txn id in the webhook request
      2. Actual: this value is not unique and does not match the txn id in the webhook request
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context
N/A

@gfaraj gfaraj added the bug Something isn't working label Sep 22, 2024
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@vegaro
Copy link
Contributor

vegaro commented Sep 23, 2024

This is expected behavior. When using StoreKit configuration files, the transaction IDs provided by StoreKit are sequential numbers (1, 2, 3), which reset every time you start a new simulator. On the backend, we need to generate unique IDs, which is why you see a different one in the webhook.

One thing to note is that the suffix in the webhook's transaction ID (_1) matches the StoreTransaction.transactionId returned by the SDK.

When a StoreKit config file is not used, the transactionId would match the one in corresponding webhook event

@gfaraj
Copy link
Author

gfaraj commented Sep 23, 2024

I was hoping you could override that identifier in the app-side to have it matched, but that's fine. Not a big deal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants