Just before payment. After entering your shipping information and choosing the payment method, you will reach the last step in which you will see the option to add the discount code and check its validity.