<!--
{
  "documentType" : "article",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/testing-a-successful-transaction",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Testing a successful transaction"
}
-->

# Testing a successful transaction

Confirm that your app can make a successful transaction in the sandbox environment by inspecting the transaction.

## Discussion

Set a breakpoint in your implementation of the transaction queue observer’s [`paymentQueue(_:updatedTransactions:)`](/documentation/StoreKit/SKPaymentTransactionObserver/paymentQueue(_:updatedTransactions:)) method. Then sign in to the App Store with a Sandbox Apple Account, and make a purchase in your app. Inspect the transaction to verify that its status is [`SKPaymentTransactionState.purchased`](/documentation/StoreKit/SKPaymentTransactionState/purchased).

Set a breakpoint at the point in your code where your app stores the purchase, and confirm that your code saves the data in response to a successful purchase. Inspect the user default or iCloud key-value store, to verify that your code correctly records the information. For more information on saving data in response to a successful purchase, see [Persisting a purchase](/documentation/StoreKit/persisting-a-purchase).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)