The cookie lasts for 24 hours. As soon as the click is made the timer starts. Any purchases made during that 24 hour period earn you a commission.
There is an exception to this. Some affiliates use what is called an “Add to Cart” affiliate link. If this link type is used, the user does not get directed to the product page on Amazon, and instead, the item is added directly to the user’s cart. In this instance, that cookie lasts for 90 days. If the user completes that purchase within 90 days, the affiliate gets a commission. Most affiliates choose not to use the “Add to Cart” link because you only get credit for that one item. The ‘normal’ 24-hour cookie link gets you credit for ALL items purchased on Amazon by the user within that 24-hour period.
And there is a caveat to both of the above. Once the cookie is activated, if the person who clicked through from one of your links then leaves Amazon, goes to another website, and re-enters Amazon via somebody else’s affiliate link, then your cookie will die and theirs will be activated. It’s probably rare that this will happen, but it’s worth knowing.