StoreKit2 - How to get actual price paid for subscription via Transaction?

My app listens for transactions using:

for await result in Transaction.updates {
  // check verification and process Transaction
}

The result coming from these updates has a jwsRepresentation field, which when decoded server-side reveals the price the user paid, discounted in the case of a custom offer code. How can I get this value without a server roundtrip? Transaction does not have price field, and the subscription product's price does not seem to include custom offer code pricing.

Answered by App Store Commerce Engineer in 782504022
Accepted Answer

Thank you! I was using Xcode 15.0 and this hadn't been added yet.

StoreKit2 - How to get actual price paid for subscription via Transaction?
 
 
Q