How to cancel an Amazon order

I placed an order on Amazon and I wanted to cancel it a few minutes later (wanted to reorder using the Amazon Store Card). You are allowed to cancel the order from the order details page, but probably since I chose Amazon Prime shipping option, the option to cancel the order vanished after a few minutes.

After trying different tricks for about an hour, I ended up canceling the order this way.