We need to get a unique purchase ID for non-subscription purchases.
It may take some time for the item purchased to be delivered. At this time, we want to show the loading screen. For this, the user device should be able monitor the purchase status. According to our logic, for this purpose the device should periodically send requests with the transaction ID to find out the status on the backend.
The webhook gives us the transaction_id:
{
"...": "...",
"transaction_id": "2000000263221092",
"original_transaction_id": "2000000263221092",
"...": "...",
"id": "3C725F74-BB80-40F0-A409-67F5352D9FCD",
"app_id": "appf1fcec6c3f"
}
The same transaction_id is available in the RevenueCat SDK logs:
```plain
Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST receipts
sPurchases] - DEBUG: ℹ️ API request started: POST /v1/receipts
ePurchases] - DEBUG: ℹ️ API request completed: POST /v1/receipts (200)
pPurchases] - DEBUG: ℹ️ PostReceiptDataOperation: Finished
iPurchases] - DEBUG: ℹ️ Sending updated CustomerInfo to delegate.
IPurchases] - INFO: 💰 Finishing transaction '2000000263221092' for product '...'
2Purchases] - INFO: 😻💰 Purchased product - '...'
Purchases] - DEBUG: ℹ️ Serial request done: POST receipts, 0 requests left in the queue
,Purchases] - DEBUG: ℹ️ Vending CustomerInfo from cache.
Purchases] - DEBUG: ℹ️ StoreKit1Wrapper (0x0000000282713600) removedTransaction: ... 2000000263221092 1
```
On the React Native side, a transactionIdentifier is available in customerInfo. But it does not match the transaction_id:
{
"customerInfo": {
"entitlements": {
"all": {
"..."
},
"active": {
"..."
}
},
"allPurchaseDates": {
"...": "..."
},
"...": "...",
"nonSubscriptionTransactions": .
{
"purchaseDate": "2023-01-30T17:43:59Z",
"revenueCatId": "968cd0aff4",
"productIdentifier": "...",
"purchaseDateMillis": 1675100639000,
"transactionIdentifier": "968cd0aff4",
"productId": "..."
}
],
"...": "..."
},
"productIdentifier": "..."
}
How can we get transaction_id which is available in webhook/RC logs on React Native side?