AWS Certified Developer Associate DVA-C02 Practice Question
Given a situation where a developer must design an API that processes payment transactions, which of the following approaches BEST ensures that the API handles repeated submissions of the same transaction in an idempotent manner?
Implement idempotent receipt tokens that must be submitted with each transaction.
Store the state of each transaction in a database with enforced write locks to prevent concurrent writes.
Use a stateless protocol that does not require server-side tracking of transaction states.
Generate random transaction IDs for each submission and use these IDs to detect duplicates.