Question

original_transaction_id is empty

  • 1 March 2022
  • 5 replies
  • 135 views

Badge +1

Hey guys,

We are having difficulties with transaction_id and original_transaction_id fields which can be accessed from the SDK. Sometimes both of these fields have values and sometimes original_transaction_id is simply empty. When we take a look at the events which are being send via web hooks, we can actually see that original_transaction_id is not empty.

Can you please tell us why is this happening?

Also, I would like to know if there is a rule which is dictating the behavior where original_transaction_id would be empty after successful purchase?

Kind regards,

Aleksandar


5 replies

Userlevel 5
Badge +10

Hey @Aleksandar Draskovic 

Can you walk me through how you are collecting these values from the SDK?

Badge +1

Hey,

        Purchases.shared.purchasePackage(self.products[index.row]) { (transaction, purchaserInfo, error, userCancelled) in {

print(transaction?.transactionIdentifier ?? "")

print(transaction?.original?.transactionIdentifier ?? "")

}

Userlevel 5
Badge +10

Hi @Aleksandar Draskovic 

Thanks for that information! What SDK + version are you using? I’m going to try to see if I can reproduce this myself. How often are you noticing this behavior?

Badge +1

Hi,

In Pods version, in Xcode project the version is displayed as 3.12.8.

It seems to me that it happens every time when new AppleId subscribes to a new package for the first time. SDK gives empty value for origingal_transaction_id but in the RC console, when I explore events for that user, it is stated that origingal_transaction_id and transaction_id are equal (have same non null value).

KR,

Aleksandar

Badge +1

Hi @tina,

Is there a way maybe to check which type of event happened during a purchase in the SDK? Web hook has this type field which can have multiple values. I am interested whether there is a way to read this value from the SDK?

KR,

ALeksandar

Reply