Updated redeem_code() to check for correct status code